I have a response application that uses a java ee database shutdown server running in a different domain. I have included CORS:
Access-Control-Allow-Origin : http://localhost:3000 Access-Control-Allow-Headers : origin, content-type, accept, authorization Access-Control-Allow-Credentials : true Access-Control-Allow-Methods : GET, POST, PUT, DELETE, OPTIONS, HEAD Access-Control-Max-Age : 1209600
I use the reaction with fetch as follows:
export function get(path, headers) { return fetch(apiUrl + path, { "metod" : "GET", "headers" : headers, "credentials" : "include" }) }
My response application runs on http://localhost:3000 . When I log in, the server returns a Set-Cookie, but the cookie is not included in any further request to the server unless I try to log in again. It is then turned on for that particular login request.
Any suggestions?
source share