我在中间件中设置了 cache-control = no-store, no-cache。但是在代码执行 AddMicrosoftIdentityWebApp 之后,缓存控制标头被覆盖为无缓存。如何避免覆盖缓存控制或重置缓存控制=无存储,无缓存不仅无缓存的值?
services.AddAuthentication(o =>
{
o.DefaultSignInScheme = cookieAuthenticationSettings.CookieName;
o.DefaultScheme = cookieAuthenticationSettings.CookieName;
o.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
})
.AddMicrosoftIdentityWebApp(Configuration);