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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user