Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 26 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 (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-13T00:38:16.000Z (almost 2 years ago)
- Last Synced: 2023-03-01T20:26:55.027Z (over 1 year 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.