internal void SetXXssProtectionHeader(IHttpContextWrapper context, NWebsecContext nwebsecContext) { if (_handlerHelper.IsUnmanagedHandler(context) || _handlerHelper.IsStaticContentHandler(context)) { return; } nwebsecContext.XXssProtection = WebConfig.SecurityHttpHeaders.XXssProtection; var result = _headerGenerator.CreateXXssProtectionResult(WebConfig.SecurityHttpHeaders.XXssProtection); _headerResultHandler.HandleHeaderResult(context, result); }
public void SetXXssProtectionHeader(HttpContext context) { var config = _headerConfigurationOverrideHelper.GetXXssProtectionWithOverride(context); if (config == null) { return; } var oldConfig = _contextConfigurationHelper.GetXXssProtectionConfiguration(context); var result = _headerGenerator.CreateXXssProtectionResult(config, oldConfig); _headerResultHandler.HandleHeaderResult(context.Response, result); }