Skip to content

Commit

Permalink
feat: add new exception in token interceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad-haji committed Aug 15, 2018
1 parent b04dbcc commit 80bfc78
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/app/config/interceptors/token.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ export class TokenInterceptor implements HttpInterceptor {
if (!this.isServer) {
token = localStorage.getItem('token');
}
if (token) {
request = request.clone({
setHeaders: {
'x-access-token': token,
},
});
}
// @TODO: prod uncomment this on production
// if (token) {
// request = request.clone({
// setHeaders: {
// 'x-access-token': token,
// },
// });
// }
return next.handle(request);
}
}

0 comments on commit 80bfc78

Please sign in to comment.