Startup.cs文件里
public void ConfigureServices(IServiceCollection services)方法中,关闭这里:
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => false;//关闭GDPR规范
options.MinimumSameSitePolicy = SameSiteMode.None;
});