Error fixed, applied the cookie policy to lax mode

This commit is contained in:
ericuss 2020-04-02 14:17:34 +02:00
parent d227823da4
commit 9cb1c9eef9

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 =>
{