Search Posts

Category: token

Add an exception do defaults headers in angularJS

Hello I want to use external API to gather all the current currency rate. My front is based on token and I am storing token in localForage which is nothing but async localStorage. //this execute after every page refresh $localForage.getItem(‘authorization’) .then(function(authData) { if(authData) { $scope.authentication.isAuth = true; $http.defaults.headers.common.Authorization = ‘Bearer ‘ + authData.token; //set authentication variable to true and add token to every request after page refresh } }, function(){ console.log(“error with getting authorization localForage […]

Cors configuration not working spring boot + angular [duplicate]

This question already has an answer here: Response header is present in browser but not parsed by Angular $http response.headers() 2 answers i’m trying to get authentication token from header “autherntication” using angular, but when i use “console.log(response.headers()); i got only 1) cache-control 2) expires 3) pragma in dev tools there are all headers, i tried a log of filters but nothing working 🙁 , thanks for any help ! Fragment of Web configuration @Override […]