项目中使用的为jwt验证 将cookie的验证模式修改为none 将secure修改为always
这样cookie在https请求下就可以 cookie非同源使用了。
注意一定要发布在https下 不然cookie会无法保存 ,这个是浏览器的安全处理规则
services.AddAuthentication(options =>
{
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options