Skip to content

Commit

Permalink
Aggiunto flag Secure a cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniele Giallonardo committed Feb 4, 2021
1 parent 20149c3 commit 97452d1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,11 @@ public static LogoutRequestType GetLogoutRequest(this AuthenticationProperties p

public static void Save(this AuthenticationProperties properties, HttpResponse response, ISecureDataFormat<AuthenticationProperties> encryptor)
{
response.Cookies.Append(CieDefaults.CookieName, encryptor.Protect(properties), new CookieOptions() { SameSite = SameSiteMode.None });
response.Cookies.Append(CieDefaults.CookieName, encryptor.Protect(properties), new CookieOptions()
{
SameSite = SameSiteMode.None,
Secure = true
});
}

public static void Load(this AuthenticationProperties properties, HttpRequest request, ISecureDataFormat<AuthenticationProperties> encryptor)
Expand Down

0 comments on commit 97452d1

Please sign in to comment.