|
@@ -96,6 +96,11 @@ function (angular, _, coreModule, config) {
|
|
|
var requestIsLocal = options.url.indexOf('/') === 0;
|
|
var requestIsLocal = options.url.indexOf('/') === 0;
|
|
|
var firstAttempt = options.retry === 0;
|
|
var firstAttempt = options.retry === 0;
|
|
|
|
|
|
|
|
|
|
+ if (requestIsLocal && options.headers && options.headers.Authorization) {
|
|
|
|
|
+ options.headers['X-DS-Authorization'] = options.headers.Authorization;
|
|
|
|
|
+ delete options.headers.Authorization;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return $http(options).then(null, function(err) {
|
|
return $http(options).then(null, function(err) {
|
|
|
// handle unauthorized for backend requests
|
|
// handle unauthorized for backend requests
|
|
|
if (requestIsLocal && firstAttempt && err.status === 401) {
|
|
if (requestIsLocal && firstAttempt && err.status === 401) {
|