From 39a7ed58be27513c05598edc18cf095eb5b044c5 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 25 May 2023 16:37:12 +0300 Subject: [PATCH] Properties: add hasMachineCache in order to use cookie or not. --- http-interceptor.service.ts | 2 +- utils/properties/env-properties.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/http-interceptor.service.ts b/http-interceptor.service.ts index dab01120..bdc3d3bd 100644 --- a/http-interceptor.service.ts +++ b/http-interceptor.service.ts @@ -36,7 +36,7 @@ export class HttpInterceptorService implements HttpInterceptor { } else { if (isPlatformServer(this.platformId)) { let headers = new HttpHeaders(); - if(request.withCredentials && (properties.dashboard !== 'connect' || properties.environment !== 'production')) { + if(request.withCredentials && !properties.hasMachineCache) { headers = headers.set('Cookie', this.req.get('Cookie')); } const authReq = request.clone({ diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index f0f7aacf..baed70d1 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -144,4 +144,5 @@ export interface EnvProperties { connectPortalUrl?; eoscDataTransferAPI?; eoscDataTransferDestinations?; + hasMachineCache?: boolean; }