I have a background page in the Chrome extension that makes requests to the server. Using the Chrome debugging tools, I see that Set-Cookie headers are being returned. However, subsequent requests do not contain these cookies - Chrome seems to drop them. This leads to the fact that every request made by the server is considered a new session.
On the server side, I have the following headers set:
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Credentials: true");
On the client side, I have an XMLHttpRequest object set withCredentials = true .
I also have the server address in the permissions section of the extension manifest.
I feel like I'm very close to the solution here - the server responds with the correct headers, but I cannot understand why Chrome decides not to store cookies.
Is there anything else I need to set in the headers, XMLHttpRequest object, or manifest? Or is it simply impossible?
source share