Ejemplo n.º 1
0
        internal void SetReferrerPolicyHeader(IHttpContextWrapper httpContext, NWebsecContext nwebsecContext)
        {
            nwebsecContext.ReferrerPolicy = WebConfig.SecurityHttpHeaders.ReferrerPolicy;
            var result = _headerGenerator.CreateReferrerPolicyResult(WebConfig.SecurityHttpHeaders.ReferrerPolicy);

            _headerResultHandler.HandleHeaderResult(httpContext, result);
        }
Ejemplo n.º 2
0
        public void SetReferrerPolicyHeader(HttpContext context)
        {
            var config = _headerConfigurationOverrideHelper.GetReferrerPolicyWithOverride(context);

            if (config == null)
            {
                return;
            }

            var oldConfig = _contextConfigurationHelper.GetReferrerPolicyConfiguration(context);

            var result = _headerGenerator.CreateReferrerPolicyResult(config, oldConfig);

            _headerResultHandler.HandleHeaderResult(context.Response, result);
        }