mirror of
https://github.com/bitwarden/server
synced 2025-12-30 07:03:42 +00:00
only use Secure cookies if on a https connection (#4472)
This commit is contained in:
@@ -108,6 +108,10 @@ public class Startup
|
||||
options.SaveTokens = false;
|
||||
options.GetClaimsFromUserInfoEndpoint = true;
|
||||
|
||||
// Some browsers (safari) won't allow Secure cookies to be set on a http connection
|
||||
options.CorrelationCookie.SecurePolicy = CookieSecurePolicy.SameAsRequest;
|
||||
options.NonceCookie.SecurePolicy = CookieSecurePolicy.SameAsRequest;
|
||||
|
||||
options.Events = new Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents
|
||||
{
|
||||
OnRedirectToIdentityProvider = context =>
|
||||
|
||||
Reference in New Issue
Block a user