I have a webpage under / that requires Basic auth. /api/* uses the REST API, which requires the JWT token passed in the authorization header.
It works fine in Chrome: when loading a webpage, it asks me for the basic credentials, and then the webpage makes AJAX requests to /api/* along with the JWT in the authorization header.
In Safari, however, all AJAX requests are sent with the Authorization header set to Basic credentials and do not allow JWT to be installed in the authorization header ...
Is there any workaround for this situation?
I install JWT for AJAX requests as follows:
$.ajaxSetup({ headers: {'Authorization': accessToken} });
javascript jquery safari ajax
user606521
source share