internal void SetXContentTypeOptionsHeader(HttpResponseBase response, NWebsecContext nwebsecContext)
        {
            nwebsecContext.XContentTypeOptions = WebConfig.SecurityHttpHeaders.XContentTypeOptions;
            var result = _headerGenerator.CreateXContentTypeOptionsResult(WebConfig.SecurityHttpHeaders.XContentTypeOptions);

            _headerResultHandler.HandleHeaderResult(response, result);
        }
예제 #2
0
        internal void SetXContentTypeOptionsHeader(IHttpContextWrapper httpContext, NWebsecContext nwebsecContext)
        {
            nwebsecContext.XContentTypeOptions = WebConfig.SecurityHttpHeaders.XContentTypeOptions;
            var result = _headerGenerator.CreateXContentTypeOptionsResult(WebConfig.SecurityHttpHeaders.XContentTypeOptions);

            _headerResultHandler.HandleHeaderResult(httpContext, result);
        }
예제 #3
0
        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);
        }