From be668d7d7a1d9128f625a2bfa807e6a91183b488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Mon, 18 Mar 2024 11:17:52 +0100 Subject: [PATCH] fix(api-gateway): response headers cors issue - fixes #1046 --- .../api-gateway/src/Service/Http/HttpServiceProxy.ts | 10 ++++------ .../api-gateway/src/Service/gRPC/GRPCServiceProxy.ts | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/api-gateway/src/Service/Http/HttpServiceProxy.ts b/packages/api-gateway/src/Service/Http/HttpServiceProxy.ts index 6285e90fc..2d9f70a90 100644 --- a/packages/api-gateway/src/Service/Http/HttpServiceProxy.ts +++ b/packages/api-gateway/src/Service/Http/HttpServiceProxy.ts @@ -340,13 +340,11 @@ export class HttpServiceProxy implements ServiceProxyInterface { private applyResponseHeaders(serviceResponse: AxiosResponse, response: Response): void { const returnedHeadersFromUnderlyingService = [ - 'access-control-allow-methods', - 'access-control-allow-origin', - 'access-control-expose-headers', - 'authorization', 'content-type', - 'x-ssjs-version', - 'x-auth-version', + 'authorization', + 'set-cookie', + 'access-control-expose-headers', + 'x-captcha-required', ] returnedHeadersFromUnderlyingService.map((headerName) => { diff --git a/packages/api-gateway/src/Service/gRPC/GRPCServiceProxy.ts b/packages/api-gateway/src/Service/gRPC/GRPCServiceProxy.ts index 9acf99463..bd9832cdc 100644 --- a/packages/api-gateway/src/Service/gRPC/GRPCServiceProxy.ts +++ b/packages/api-gateway/src/Service/gRPC/GRPCServiceProxy.ts @@ -435,13 +435,11 @@ export class GRPCServiceProxy implements ServiceProxyInterface { private applyResponseHeaders(serviceResponse: AxiosResponse, response: Response): void { const returnedHeadersFromUnderlyingService = [ - 'access-control-allow-methods', - 'access-control-allow-origin', - 'access-control-expose-headers', - 'authorization', 'content-type', - 'x-ssjs-version', - 'x-auth-version', + 'authorization', + 'set-cookie', + 'access-control-expose-headers', + 'x-captcha-required', ] returnedHeadersFromUnderlyingService.map((headerName) => {