.NET Core SameSite cookie问题

时间:2020-08-20 00:58:29   收藏:0   阅读:212

异常提示

This setcookie was blocked because it had the "samesite=none" attribute but did not have the "secure" attribute, which is required in order to use "same=none"

SameSite

SameSite 有3个可选值 :

其实在谷歌升级后呢,默认限制了跨域携带cookie给后端,在使用samesite=none后其实不仅仅如此,我们还需要设置Secure属性才可以生效,但是对于项目中有些不可告人的秘密,哈哈哈哈哈,所以此处不从项目中修改了我们将修Nginx服务器来解决SameSite的问题。

具体配置方法(在location节点下加入,配置后重载Nginx):

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_path
https://docs.microsoft.com/zh-cn/aspnet/samesite/system-web-samesite

原文:https://www.cnblogs.com/yyfh/p/13532689.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!