Browse Source

Error fixed, applied the cookie policy to lax mode

pull/1285/head
ericuss 4 years ago
parent
commit
9cb1c9eef9
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/Services/Identity/Identity.API/Startup.cs

+ 5
- 0
src/Services/Identity/Identity.API/Startup.cs View File

@ -154,6 +154,11 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
app.UseForwardedHeaders(); app.UseForwardedHeaders();
// Adds IdentityServer // Adds IdentityServer
app.UseIdentityServer(); 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.UseRouting();
app.UseEndpoints(endpoints => app.UseEndpoints(endpoints =>
{ {


Loading…
Cancel
Save