Unable to send credentials in CORS request
Figured it out. Two issues. First, the cookie was arriving at the browser with domain localhost
but I was actually making the requests to a dummy domain that I had simply mapped to localhost. Because the domains didn't match, the browser didn't send the cookie.
Second, here is the correct way to use the withCredentials
option in Axios:
axios.create({withCredentials: true}).get(/* ... */)
Setting the option inside the request itself didn't work for some reason.