angularjs - accessing request header in angular -


i have setup via nginx config file traffic on port 8000 routed index.html page invokes angular code processes request. new angular don't know how request makes code does. code looks this, , control passed init = function():

module.exports = function($scope, $routeparams, $sce, $timeout, $http, config) {     $scope.config = config;     $scope.identifiers = [];      var init = function(){ ... } 

in function want request headers. there way that?

edit in attempt clarify:

i know it's screwy, didn't write this, dropped in lap. when request sent on port 8000 angular code runs. know it's client side, that's happens. need check auth of initial request. if cannot in client can @ nginx level somehow?


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -