@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.
@@ -8394,8 +8394,9 @@ function fileSizeValidator(maxFileSize) {
8394
8394
  }
8395
8395
 
8396
8396
  var HttpCookieInterceptor = /** @class */ (function () {
8397
- function HttpCookieInterceptor(injector, platformId) {
8397
+ function HttpCookieInterceptor(injector, configService, platformId) {
8398
8398
  this.injector = injector;
8399
+ this.configService = configService;
8399
8400
  this.platformId = platformId;
8400
8401
  this.isBrowser = isPlatformBrowser(this.platformId);
8401
8402
  }
@@ -8403,7 +8404,8 @@ var HttpCookieInterceptor = /** @class */ (function () {
8403
8404
  if (!this.isBrowser) {
8404
8405
  return next.handle(req);
8405
8406
  }
8406
- if (req.withCredentials !== false) {
8407
+ var apiUrl = this.configService.get('apiUrl');
8408
+ if (apiUrl === req.url.substr(0, apiUrl.length)) {
8407
8409
  req = req.clone({ withCredentials: true });
8408
8410
  }
8409
8411
  var csrf = getCookie('csrftoken');
@@ -8416,11 +8418,12 @@ var HttpCookieInterceptor = /** @class */ (function () {
8416
8418
  };
8417
8419
  HttpCookieInterceptor.ctorParameters = function () { return [
8418
8420
  { type: Injector },
8421
+ { type: ConfigService },
8419
8422
  { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
8420
8423
  ]; };
8421
8424
  HttpCookieInterceptor = __decorate([
8422
8425
  Injectable(),
8423
- __param(1, Inject(PLATFORM_ID))
8426
+ __param(2, Inject(PLATFORM_ID))
8424
8427
  ], HttpCookieInterceptor);
8425
8428
  return HttpCookieInterceptor;
8426
8429
  }());