diff --git a/BlogEngine/BlogEngine.NET/Global.asax b/BlogEngine/BlogEngine.NET/Global.asax index 0056bc60..2fd043a7 100644 --- a/BlogEngine/BlogEngine.NET/Global.asax +++ b/BlogEngine/BlogEngine.NET/Global.asax @@ -12,4 +12,17 @@ { BlogEngineConfig.SetCulture(sender, e); } + + protected void Application_PreSendRequestHeaders () + { + var httpContext = HttpContext.Current; + if (httpContext != null) { + var cookieValueSuffix = "; SameSite=Strict"; + var cookies = httpContext.Response.Cookies; + for (var i = 0; i < cookies.Count; i++) + { + var cookie = cookies[i]; cookie.Value += cookieValueSuffix; + } + } + } \ No newline at end of file