@arsedizioni/ars-utils 20.4.4 → 20.4.5
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.
|
@@ -2057,6 +2057,10 @@ class ClipperService {
|
|
|
2057
2057
|
* @param flags: the service flags. Default is none.
|
|
2058
2058
|
*/
|
|
2059
2059
|
initialize(serviceUri, appUri, flags = ClipperServiceFlags.None) {
|
|
2060
|
+
// Create unique client id
|
|
2061
|
+
if (!sessionStorage.getItem('clipper_client_id')) {
|
|
2062
|
+
sessionStorage.setItem('clipper_client_id', SystemUtils.generateUUID());
|
|
2063
|
+
}
|
|
2060
2064
|
// Initialize
|
|
2061
2065
|
this._serviceUri = serviceUri;
|
|
2062
2066
|
this._appUri = appUri;
|
|
@@ -3051,7 +3055,13 @@ class ClipperAuthInterceptor {
|
|
|
3051
3055
|
}
|
|
3052
3056
|
intercept(request, next) {
|
|
3053
3057
|
if (request.url.startsWith(this.clipperService.serviceUri)) {
|
|
3054
|
-
request = request.clone({
|
|
3058
|
+
request = request.clone({
|
|
3059
|
+
withCredentials: true,
|
|
3060
|
+
setHeaders: {
|
|
3061
|
+
'ngsw-bypass': 'ngsw-bypass',
|
|
3062
|
+
'X-Client-Id': sessionStorage.getItem('clipper_client_id') ?? ''
|
|
3063
|
+
}
|
|
3064
|
+
});
|
|
3055
3065
|
return next.handle(request)
|
|
3056
3066
|
.pipe(catchError$1(error => {
|
|
3057
3067
|
if (error.url.startsWith(this.clipperService.serviceUri)) {
|