I have a js client applcation that uses an http-only cookie to store the currently authenticated user's credentials. The application uses the data in the cookie to perform the per-request authentication.
However, the application does make ajax requests that unfortunately do not include the cookie. When the server comes to process these requests, it believes it has no cookie, therefore there is no authenticated user and performs redirect to the login page. Still, the cookie is there and all standard http requests work as expected.
Is there any easy workaround for this issue? What is the recommended practice in such scenarios?