@osovitny/anatoly 3.20.5 → 3.20.7
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.
|
@@ -2560,7 +2560,8 @@ class AnatolyHttpInterceptor {
|
|
|
2560
2560
|
];
|
|
2561
2561
|
this.authorizationTokenExceptions = [
|
|
2562
2562
|
'assets',
|
|
2563
|
-
'dist'
|
|
2563
|
+
'dist',
|
|
2564
|
+
'loadAppInitializerSettings'
|
|
2564
2565
|
];
|
|
2565
2566
|
this.autoCDNSASTokenUrls = [
|
|
2566
2567
|
'chunks',
|
|
@@ -2620,14 +2621,16 @@ class AnatolyHttpInterceptor {
|
|
|
2620
2621
|
}
|
|
2621
2622
|
else {
|
|
2622
2623
|
for (var i = 0; i < this.authorizationTokenExceptions.length; i++) {
|
|
2623
|
-
|
|
2624
|
+
let u = url.toLowerCase();
|
|
2625
|
+
let e = this.authorizationTokenExceptions[i].toLowerCase();
|
|
2626
|
+
if (u.indexOf(e) >= 0) {
|
|
2624
2627
|
authorizationTokenRequired = false;
|
|
2625
2628
|
break;
|
|
2626
2629
|
}
|
|
2627
2630
|
}
|
|
2628
2631
|
}
|
|
2629
|
-
//4.
|
|
2630
|
-
if (url.indexOf('
|
|
2632
|
+
//4. getCurrentContext
|
|
2633
|
+
if (url.indexOf('getCurrentContext') > -1) {
|
|
2631
2634
|
authorizationTokenRequired = this.authService.isUserAuthenticated();
|
|
2632
2635
|
}
|
|
2633
2636
|
// Change Url if need it -------------------------------------------->
|
|
@@ -2648,7 +2651,9 @@ class AnatolyHttpInterceptor {
|
|
|
2648
2651
|
}
|
|
2649
2652
|
//7. set ca
|
|
2650
2653
|
let app = getCurrentApp();
|
|
2651
|
-
|
|
2654
|
+
if (app) {
|
|
2655
|
+
newUrl = this.setQS(newUrl, 'ca=' + app.type);
|
|
2656
|
+
}
|
|
2652
2657
|
//8. set new url
|
|
2653
2658
|
req = req.clone({ url: newUrl });
|
|
2654
2659
|
req = req.clone({ headers: req.headers.set('Accept', 'application/json') });
|
|
@@ -2730,7 +2735,7 @@ class StarterService extends ApiServiceBase {
|
|
|
2730
2735
|
let stopwatch = new Stopwatch("@osovitny/anatoly. StarterService: getting AppContext from API");
|
|
2731
2736
|
stopwatch.start();
|
|
2732
2737
|
this.baseUrl = `${ApiUrl}/app`;
|
|
2733
|
-
return this.get('
|
|
2738
|
+
return this.get('appStarting').pipe(map(data => {
|
|
2734
2739
|
//Logging
|
|
2735
2740
|
stopwatch.stop();
|
|
2736
2741
|
stopwatch.printElapsedAsMilliseconds();
|