@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.
- package/bundles/mtgame-core.umd.js +6 -3
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/http-cookie.interceptor.js +8 -4
- package/esm5/http-cookie.interceptor.js +8 -4
- package/fesm2015/mtgame-core.js +6 -3
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +6 -3
- package/fesm5/mtgame-core.js.map +1 -1
- package/http-cookie.interceptor.d.ts +3 -1
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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(
|
|
8639
|
+
__param(2, core.Inject(core.PLATFORM_ID))
|
|
8637
8640
|
], HttpCookieInterceptor);
|
|
8638
8641
|
return HttpCookieInterceptor;
|
|
8639
8642
|
}());
|