diff --git a/http-interceptor.service.ts b/http-interceptor.service.ts index 6d97d29b..dadd3781 100644 --- a/http-interceptor.service.ts +++ b/http-interceptor.service.ts @@ -36,7 +36,9 @@ export class HttpInterceptorService implements HttpInterceptor { } else { if (isPlatformServer(this.platformId)) { let headers = new HttpHeaders(); - headers = headers.set('Cookie', this.req.get('Cookie')); + if(request.withCredentials) { + headers = headers.set('Cookie', this.req.get('Cookie')); + } const authReq = request.clone({ headers: headers });