Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.