internal void SetXContentTypeOptionsHeader(HttpResponseBase response, NWebsecContext nwebsecContext) { nwebsecContext.XContentTypeOptions = WebConfig.SecurityHttpHeaders.XContentTypeOptions; var result = _headerGenerator.CreateXContentTypeOptionsResult(WebConfig.SecurityHttpHeaders.XContentTypeOptions); _headerResultHandler.HandleHeaderResult(response, result); }
internal void SetXContentTypeOptionsHeader(IHttpContextWrapper httpContext, NWebsecContext nwebsecContext) { nwebsecContext.XContentTypeOptions = WebConfig.SecurityHttpHeaders.XContentTypeOptions; var result = _headerGenerator.CreateXContentTypeOptionsResult(WebConfig.SecurityHttpHeaders.XContentTypeOptions); _headerResultHandler.HandleHeaderResult(httpContext, result); }
public void SetXContentTypeOptionsHeader(HttpContext context) { var config = _headerConfigurationOverrideHelper.GetXContentTypeOptionsWithOverride(context); if (config == null) { return; } var oldConfig = _contextConfigurationHelper.GetXContentTypeOptionsConfiguration(context); var result = _headerGenerator.CreateXContentTypeOptionsResult(config, oldConfig); _headerResultHandler.HandleHeaderResult(context.Response, result); }