@mtgame/core 0.0.72 → 0.0.73

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.
@@ -8607,8 +8607,9 @@
8607
8607
  }
8608
8608
 
8609
8609
  var HttpCookieInterceptor = /** @class */ (function () {
8610
- function HttpCookieInterceptor(injector, platformId) {
8610
+ function HttpCookieInterceptor(injector, configService, platformId) {
8611
8611
  this.injector = injector;
8612
+ this.configService = configService;
8612
8613
  this.platformId = platformId;
8613
8614
  this.isBrowser = common.isPlatformBrowser(this.platformId);
8614
8615
  }
@@ -8616,7 +8617,8 @@
8616
8617
  if (!this.isBrowser) {
8617
8618
  return next.handle(req);
8618
8619
  }
8619
- if (req.withCredentials !== false) {
8620
+ var apiUrl = this.configService.get('apiUrl');
8621
+ if (apiUrl === req.url.substr(0, apiUrl.length)) {
8620
8622
  req = req.clone({ withCredentials: true });
8621
8623
  }
8622
8624
  var csrf = getCookie('csrftoken');
@@ -8629,11 +8631,12 @@
8629
8631
  };
8630
8632
  HttpCookieInterceptor.ctorParameters = function () { return [
8631
8633
  { type: core.Injector },
8634
+ { type: ConfigService },
8632
8635
  { type: String, decorators: [{ type: core.Inject, args: [core.PLATFORM_ID,] }] }
8633
8636
  ]; };
8634
8637
  HttpCookieInterceptor = __decorate([
8635
8638
  core.Injectable(),
8636
- __param(1, core.Inject(core.PLATFORM_ID))
8639
+ __param(2, core.Inject(core.PLATFORM_ID))
8637
8640
  ], HttpCookieInterceptor);
8638
8641
  return HttpCookieInterceptor;
8639
8642
  }());