[英]this attempt to set a cookie via set-cookie header was blocked
These is my cookie settings:这些是我的 cookie 设置:
Max-Age=86400; Domain=https://domain.me; Path=/; Expires=Tue, 23 Aug 2022 18:18:55 GMT; HttpOnly; Secure; SameSite=Strict
This is my domain:这是我的域名:
https://domain.me
This is my api domain:这是我的 api 域:
https://api.domain.me
But whenever i try to do a set-cookie i get this error:但是每当我尝试做一个 set-cookie 时,我都会收到这个错误:
this attempt to set a cookie via set-cookie header was blocked because its domain attribute was invalid with regards to the current host url.
How is this possible if the domain attribute is the same as the url?如果域属性与 url 相同,这怎么可能?
I removed Https://
from the domain attribute in the cookie settings and it worked!我从 cookie 设置中的域属性中删除
Https://
并且它起作用了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.