@stemy/ngx-utils 11.1.1 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2987,11 +2987,12 @@
2987
2987
  var authKey = "Authorization";
2988
2988
  // If an authorization header exists and we still have an Unauthorized response prompt the user to log in again
2989
2989
  if (headers.has(authKey) && response.status == 401) {
2990
- _this.pushFailedRequest(url, options, function () {
2990
+ var pushed = _this.pushFailedRequest(url, options, function () {
2991
2991
  options.headers = _this.makeHeaders(options.originalHeaders);
2992
2992
  _this.toPromise(url, options, listener).then(resolve, reject);
2993
2993
  });
2994
- _this.handleUnauthorizedError(absoluteUrl, options, function () { return reject(response); });
2994
+ if (pushed)
2995
+ _this.handleUnauthorizedError(absoluteUrl, options, function () { return reject(response); });
2995
2996
  return;
2996
2997
  }
2997
2998
  reject(response);
@@ -3001,8 +3002,9 @@
3001
3002
  };
3002
3003
  BaseHttpService.prototype.pushFailedRequest = function (url, options, req) {
3003
3004
  if (url.indexOf("tokens") >= 0)
3004
- return;
3005
+ return false;
3005
3006
  BaseHttpService.failedRequests.push(req);
3007
+ return true;
3006
3008
  };
3007
3009
  BaseHttpService.prototype.checkHeaders = function (headers) {
3008
3010
  if (!headers || !headers.cookie || !headers.referer || !headers.host) {