Merge pull request #1285 from dotnet-architecture/fix/chrome_samesite_error

Error fixed, applied the cookie policy to lax mode
This commit is contained in:
Miguel Veloso 2020-04-02 15:34:46 +01:00 committed by GitHub
commit e652517e23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,6 +154,11 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
app.UseForwardedHeaders();
// Adds IdentityServer
app.UseIdentityServer();
// Fix a problem with chrome. Chrome enabled a new feature "Cookies without SameSite must be secure",
// the coockies shold be expided from https, but in eShop, the internal comunicacion in aks and docker compose is http.
// To avoid this problem, the policy of cookies shold be in Lax mode.
app.UseCookiePolicy(new CookiePolicyOptions { MinimumSameSitePolicy = AspNetCore.Http.SameSiteMode.Lax });
app.UseRouting();
app.UseEndpoints(endpoints =>
{