MVC cookie 在谷歌90版本后跨域失败的问题

把cookie的 SameSite 设为none  SecurePolicy设为Always

                services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).
                    AddCookie(x =>
                    {
                        x.Cookie.SecurePolicy = CookieSecurePolicy.Always;
                        x.Cookie.SameSite = SameSiteMode.None;
                    });

  

posted @ 2021-06-25 13:03  _wh  阅读(189)  评论(0)    收藏  举报