Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
VP-4168: Use Lax same site mode for XSRF-TOkEN cookie (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvishnyakov authored Aug 14, 2020
1 parent cab7ef2 commit 49fcd2f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override void OnResultExecuting(ResultExecutingContext context)
if (context.Result is ViewResult viewResult && statusCodeReExecuteFeature == null)
{
var tokens = antiforgery.GetAndStoreTokens(context.HttpContext);
context.HttpContext.Response.Cookies.Append("XSRF-TOKEN", tokens.RequestToken, new CookieOptions() { HttpOnly = false, IsEssential = true });
context.HttpContext.Response.Cookies.Append("XSRF-TOKEN", tokens.RequestToken, new CookieOptions() { HttpOnly = false, IsEssential = true, SameSite = SameSiteMode.Lax });
}
}

Expand Down

0 comments on commit 49fcd2f

Please sign in to comment.