fix(cookie): Fehlerhaften Consent-Cookie-Button entfernt und durch von Microsoft empfohlene Struktur ersetzt

- Den fehlerhaften Consent-Cookie-Button entfernt und die von Microsoft empfohlene Struktur integriert, um die Compliance und Funktionalität zu verbessern.
This commit is contained in:
Developer 02
2024-09-20 13:07:32 +02:00
parent fc171e5b89
commit 5c4acd17a0
2 changed files with 28 additions and 20 deletions

View File

@@ -63,6 +63,15 @@ try
q.JsonSerializerOptions.ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.IgnoreCycles;
});
builder.Services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential
// cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.MinimumSameSitePolicy = SameSiteMode.None;
});
if (config.GetValue<bool>("EnableSwagger") && builder.IsDevOrDiP())
{
builder.Services.AddEndpointsApiExplorer();
@@ -187,7 +196,7 @@ try
app.UseStaticFiles();
//app.UseCookiePolicy();
app.UseCookiePolicy();
app.UseRouting();