了解SameSite
为防止跨站点伪造而实施的更改。资料来源:https : //blog.chromium.org/2019/10/developers-get-ready-for-new.html
我正在尝试将其值设置为“无”并按Secure
广告使用。
我当前的web.config
设置如下:
<system.web>
<sessionState cookieless="UseCookies"
timeout="20"
cookieSameSite="None"
xdt:Transform="Replace"
xdt:Locator="Match(cookieless)"/>
</system.web>
文档来源:https ://docs.microsoft.com/zh-cn/dotnet/api/system.web.configuration.sessionstatesection.cookiesamesite ? view = netframework-4.8#System_Web_Configuration_SessionStateSection_CookieSameSite
但是仍然出现以下错误:
A cookie associated with a resource at `mywebsite.net` was set with `SameSite=None` but without `Secure`. A future release of Chrome will only deliver cookies marked `SameSite=None` if they are also marked `Secure`.
如何secure
在上面的web.config文件中指定属性?任何线索将不胜感激。
根据Microsoft的此链接,sessionState没有该属性,因此它回退到httpCookies部分。https://docs.microsoft.com/zh-cn/aspnet/samesite/system-web-samesite希望能有所帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句