【发布时间】:2021-02-08 22:27:53
【问题描述】:
我正在使用端口 x 上带有 IIS express 的 MVC 服务器。
我在端口 y 上使用 express 服务器运行我的客户端代码,并将我的数据请求发送到 localhost:x 上的服务器
这里的问题是,由于 CORS,SessionId cookie 不会在每次请求时都发送回服务器。
我读到如果cookie未设置为SameSite->none,cookie将不会发送到不同的域,但为了将其设置为无,您还需要将其设置为Secure,正如我从这里读到的https://web.dev/samesite-cookies-explained/
如果我想使用 HTTP 并且我希望客户端将 cookie 发送到服务器,是否有替代方法
【问题讨论】:
标签: javascript c# express cookies