jaywcjlove / jaywcjlove/nginx-tutorial
CORS 跨域的一点问题
Open
- Dominant language
- No language data
- Stars
- 1.4k
- Forks
- 238
- PR merge metrics
- No merged PRs in 30d
Description
一般 CORS 跨域的时候不允许用户携带 cookie,此时设置 `Access-Control-Allow-Origin` 为 `*` 可以允许所有域使用资源,但是如果允许携带 cookie 的话,服务端需要设置 `Access-Control-Allow-Credentials` 为 `true`,同时 `Access-Control-Allow-Origin` 不能设置为 `*`,必须设置为前端所在的确切域名。
我记得是这样,文章写得很棒,非常感谢
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.