https://github.com/nargonath/express-cookie-cors-debug
Reproduction setup to debug why cookies are not set in browser when doing CORS request
https://github.com/nargonath/express-cookie-cors-debug
Last synced: 7 days ago
JSON representation
Reproduction setup to debug why cookies are not set in browser when doing CORS request
- Host: GitHub
- URL: https://github.com/nargonath/express-cookie-cors-debug
- Owner: Nargonath
- License: mit
- Created: 2020-06-08T09:25:42.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-13T00:38:16.000Z (over 2 years ago)
- Last Synced: 2025-03-03T15:22:05.229Z (4 months ago)
- Language: HTML
- Size: 251 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
express-cookie-cors-debug
Reproduction setup to debug why cookies are not set in browser when doing CORS request
# Solution
The problem was coming from the missing `credentials` property of `fetch`. I initially thought that `credentials` was only to tell the browser to send credentials with the request but it also dictates the browser behavior when receiving credentials from the server. I also needed to set `credentials` to `include` in my case.