Example #1
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);
        }