Q:

Cookie is not set automatically by the browser

I am trying to login by calling an API via a POST HTTP request. 
post(
   postLogin(email),
   JSON.stringify({password: passwd}), 
   { headers: { "Content-Type":"application/json" },
     credentials: 'include' // i also tried with 'same-origin'
   }
)

I am using Redux and React. In the API response, I receive the Set-Cookie header (I can see it in browser dev tools), but for some reason I cannot access it in my code and the browser doesn't set the cookie. I'm using Chrome Version 63.0.3239.84. It is a cross-origin request, so I have the following CORS headers set so I think it is not from here.
Access-Control-Allow-Credentials:true
Access-Control-Allow-Headers:*
Access-Control-Allow-Methods:GET, OPTIONS
Access-Control-Allow-Origin:* 

Do you have any suggestions or someone has this issue too? Thank you!

A:

I have finally fixed it. The problem was that my application and the API were not in the same domain. I configure a local NGINX in order to have them under the same domain and it works fine.

