AngularJS: Setting correct 'Referer' header for $http -


it looks when send off request using $http service, referer header set base url without angular $location information.

how go appending $location.path() header requests?

our api calls log referer header when error occurs; however, helpful if store user's actual location ("stackoverflow.com/#/question/1234" opposed "stackoverflow.com/")

i ended doing this:

$httpprovider.interceptors.push(function ($location) {     return {         request: function (config) {             config.headers["refererfullurl"] = $location.absurl();             return config;         }     }; }); 

it doesn't browsers happy if try change 'referer' url, i'm naming else, , looking header on server


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -