Skip to content Skip to sidebar Skip to footer

Angular.js Saying Custom Http Response Header Is Null

The callback function for the POST is returning null for my custom HTTP header X-Auth-Token. Chrome is showing the correct POST response headers, but Angular.js is not. The only on

Solution 1:

Thanks for this solution goes to @dbugger who commented the answer I needed:

Looks like the server needs to give permission to see the headers. Check out this: Reading response headers when using $http of Angularjs

The proper way to make headers available outside of your local domain is to set: Access-Control-Expose-Headers on your webserver. In this particular case, you would put X-Auth-Token.

Post a Comment for "Angular.js Saying Custom Http Response Header Is Null"