Browse Source

fix cookie policy

pull/1559/head
Borja García Rodríguez 4 years ago
parent
commit
8c7ff74194
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      src/Web/WebhookClient/Startup.cs

+ 8
- 1
src/Web/WebhookClient/Startup.cs View File

@ -61,7 +61,6 @@ namespace WebhookClient
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
}
app.UseAuthentication();
app.Map("/check", capp =>
{
capp.Run(async (context) =>
@ -92,12 +91,20 @@ namespace WebhookClient
}
});
});
// Fix samesite issue when running eShop from docker-compose locally as by default http protocol is being used
// Refer to https://github.com/dotnet-architecture/eShopOnContainers/issues/1391
app.UseCookiePolicy(new CookiePolicyOptions { MinimumSameSitePolicy = SameSiteMode.Lax });
app.UseStaticFiles();
app.UseSession();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapDefaultControllerRoute();
endpoints.MapRazorPages();
});
}
}


Loading…
Cancel
Save