update the cookie consent control.

This commit is contained in:
Ben
2025-02-28 23:32:17 +08:00
parent 6dddd8eff8
commit 1ced5c0425
16 changed files with 322 additions and 134 deletions

View File

@ -169,13 +169,6 @@ namespace Oqtane
options.CustomSchemaIds(type => type.ToString()); // Handle SchemaId already used for different type
});
services.TryAddSwagger(_useSwagger);
//add cookie consent policy
services.Configure<CookiePolicyOptions>(options =>
{
options.CheckConsentNeeded = context => true;
options.ConsentCookieValue = Constants.CookieConsentCookieValue;
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@ -232,8 +225,6 @@ namespace Oqtane
app.UseAuthentication();
app.UseAuthorization();
app.UseAntiforgery();
app.UseCookiePolicy();
app.UseCookieConsent();
if (_useSwagger)
{