public UrlFilter(IWorkContextAccessor wca, IRepository<FilteredRequestRecord> filteredRequestRecords, ICachedUrlProtectorRules cachedUrlProtectorRules, IOrchardServices orchardServices) { _wca = wca; _filteredRequestRecords = filteredRequestRecords; _cachedUrlProtectorRules = cachedUrlProtectorRules; _orchardServices = orchardServices; Logger = NullLogger.Instance; UserAgent = _wca.GetContext().HttpContext.Request.UserAgent; UserHostAddress = _wca.GetContext().HttpContext.Request.UserHostAddress; RequestUrl = _wca.GetContext().HttpContext.Request.Url; }
public UrlProtectorController( ICachedUrlProtectorRules cachedUrlProtectorRules, IRepository<DashboardFilterRecord> dashboardFilterRecords, IRepository<UrlFilterRecord> urlFilterRecords, IRepository<FilteredRequestRecord> filteredRequestRecords, IOrchardServices orchardServices, IWorkContextAccessor workContextAccessor, IAuthorizer authorizer, ISignals signals) { _cachedUrlProtectorRules = cachedUrlProtectorRules; _dashboardFilterRecords = dashboardFilterRecords; _urlFilterRecords = urlFilterRecords; _filteredRequestRecords = filteredRequestRecords; _orchardServices = orchardServices; _workContextAccessor = workContextAccessor; _authorizer = authorizer; _signals = signals; T = NullLocalizer.Instance; }