Angularjs - Authorization header not added in Safari Angularjs - Authorization header not added in Safari angularjs angularjs

Angularjs - Authorization header not added in Safari


Finally stumbled upon the solution to this annoying problem. It turned out that it was actually related to how Angularjs removes trailing slashes in url's and how Django needs those slashes to perform its magic.

Because the trailing slash in Angular was removed, the server responded with a 301 (permanently moved) response. The Django Rest Framework then redirected the request to the correct url (including trailing slashed). However, for some reason in both IE and Safari, the authentication tokens were not passed into this second request. And there's your problem.

Hope this is of any help.