diff --git a/src/interceptors/oauth-interceptor.js b/src/interceptors/oauth-interceptor.js index b94be80..f411396 100644 --- a/src/interceptors/oauth-interceptor.js +++ b/src/interceptors/oauth-interceptor.js @@ -9,7 +9,11 @@ function oauthInterceptor($q, $rootScope, OAuthToken) { config.headers = config.headers || {}; // Inject `Authorization` header. - if (!config.headers.hasOwnProperty('Authorization') && OAuthToken.getAuthorizationHeader()) { + if ( + ( + !config.headers.hasOwnProperty('Authorization') || typeof config.headers.Authorization !== 'undefined' + ) && OAuthToken.getAuthorizationHeader() + ) { config.headers.Authorization = OAuthToken.getAuthorizationHeader(); }