与位于 http://local ip/ 的跨站点资源关联的 cookie 被设置为没有 `SameSite` 属性
A cookie associated with a cross-site resource at http://local ip/ was set without the `SameSite` attribute
尝试在 Cordova 应用程序中调用本地主机 URL 我遇到以下错误
A cookie associated with a cross-site resource at http://local_ip/ was set without the `SameSite`
attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are
set with `SameSite=None` and `Secure`. You can review cookies in developer tools under
Application>Storage>Cookies and see more details at
https://www.chromestatus.com/feature/5088147346030592 and
https://www.chromestatus.com/feature/5633521622188032.
还有这个错误
Resource interpreted as Document but transferred with MIME type application/vnd.ms-excel:
"http://local_ip:8083/api/getMailReport? reportType=MU&surId=SUR00002&selectedFromDate=05%2F11%2F2019&selectedToDate=11%2F11%2F2019&lang=E&gener
ateReport=Generate+Report".
如何解决这个问题
Chrome 将在 Chrome 80 中更改其行为以应用两个新规则:
- 默认情况下,没有
SameSite
属性的 Cookie 将被视为 SameSite=Lax
,即它们将仅是第一方或同一站点
- 用于第三方或跨站点使用的 Cookie 必须标记为
SameSite=None; Secure
。
控制台警告只是通知您,您需要根据网站需要的行为向 cookie 添加相关属性。
您可以查看https://web.dev/samesite-cookies-explained and https://web.dev/samesite-cookie-recipes了解更多信息。
尝试在 Cordova 应用程序中调用本地主机 URL 我遇到以下错误
A cookie associated with a cross-site resource at http://local_ip/ was set without the `SameSite`
attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are
set with `SameSite=None` and `Secure`. You can review cookies in developer tools under
Application>Storage>Cookies and see more details at
https://www.chromestatus.com/feature/5088147346030592 and
https://www.chromestatus.com/feature/5633521622188032.
还有这个错误
Resource interpreted as Document but transferred with MIME type application/vnd.ms-excel:
"http://local_ip:8083/api/getMailReport? reportType=MU&surId=SUR00002&selectedFromDate=05%2F11%2F2019&selectedToDate=11%2F11%2F2019&lang=E&gener
ateReport=Generate+Report".
如何解决这个问题
Chrome 将在 Chrome 80 中更改其行为以应用两个新规则:
- 默认情况下,没有
SameSite
属性的 Cookie 将被视为SameSite=Lax
,即它们将仅是第一方或同一站点 - 用于第三方或跨站点使用的 Cookie 必须标记为
SameSite=None; Secure
。
控制台警告只是通知您,您需要根据网站需要的行为向 cookie 添加相关属性。
您可以查看https://web.dev/samesite-cookies-explained and https://web.dev/samesite-cookie-recipes了解更多信息。