Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(login): Login didn't correctly pass headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Schranz committed Mar 19, 2015
1 parent 0565b25 commit 92d3ca0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/scripts/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ function appRun(gettextCatalog: any, Restangular: restangular.IProvider,
// TODO more than just 404
//$state.go("404", {}, {inherit: true});
});

Restangular.setFullRequestInterceptor(function(element, operation, route, url, headers, params, httpConfig) {
var userHeaders = {};

if (UserService.currentUser) {
if (UserService.currentUser || $cookies["X-Auth-Token"]) {
userHeaders["X-Auth-Token"] = $cookies["X-Auth-Token"];
userHeaders["X-Auth-Username"] = $cookies["X-Auth-Username"];
}
Expand Down

0 comments on commit 92d3ca0

Please sign in to comment.