I attach on every outgoing request an Authorization header whose value is 'Bearer {access_token}' with the following command : window.axios.defaults.headers.common['Authorization'] = 'Bearer ' + localStorage.getItem('access_token');
This works fine everywhere except on iOS where the header is not attached to the request. I also tried to attach it on a single request, and same issue. The header is not present in the request and the server returns a 401 Unauthorized error.
The bug happens whatever the browser is on iOS : Safari, Chrome, Firefox. It is really specific to iOS (my version is 11.3.1). No problem on Android or on Desktop (MacOS, Windows).
I made some debugging with the iOS Simulator (where the problem also happens) : there is an item named access_token
in the localStorage so the problem is not related to that.
What is happening??
thanks