Here is the code snippet I am working with:
$http({
'method': 'GET',
'url': 'http://www.example.com',
'withCredentials': true,
headers: {
'Content-type': 'application/json'
}
}).
success(function (data, response, headers, status) {
});
When executing this code, it returns a JSON array of records. The HTTP request includes credentials in the form of a JSESSIONID that is used for subsequent calls to the backend.
The issue arises when testing on different browsers - Firefox works fine and sends cookies containing the JSESSIONID, but Chrome does not, even though withCredentials
is set to true
.
What could be causing this discrepancy between browsers?