fix(api-gateway): response headers cors issue - fixes #1046

This commit is contained in:
Karol Sójko 2024-03-18 11:17:52 +01:00
parent 87e50ec941
commit be668d7d7a
No known key found for this signature in database
GPG key ID: C2F813669419D05F
2 changed files with 8 additions and 12 deletions

View file

@ -340,13 +340,11 @@ export class HttpServiceProxy implements ServiceProxyInterface {
private applyResponseHeaders(serviceResponse: AxiosResponse, response: Response): void { private applyResponseHeaders(serviceResponse: AxiosResponse, response: Response): void {
const returnedHeadersFromUnderlyingService = [ const returnedHeadersFromUnderlyingService = [
'access-control-allow-methods',
'access-control-allow-origin',
'access-control-expose-headers',
'authorization',
'content-type', 'content-type',
'x-ssjs-version', 'authorization',
'x-auth-version', 'set-cookie',
'access-control-expose-headers',
'x-captcha-required',
] ]
returnedHeadersFromUnderlyingService.map((headerName) => { returnedHeadersFromUnderlyingService.map((headerName) => {

View file

@ -435,13 +435,11 @@ export class GRPCServiceProxy implements ServiceProxyInterface {
private applyResponseHeaders(serviceResponse: AxiosResponse, response: Response): void { private applyResponseHeaders(serviceResponse: AxiosResponse, response: Response): void {
const returnedHeadersFromUnderlyingService = [ const returnedHeadersFromUnderlyingService = [
'access-control-allow-methods',
'access-control-allow-origin',
'access-control-expose-headers',
'authorization',
'content-type', 'content-type',
'x-ssjs-version', 'authorization',
'x-auth-version', 'set-cookie',
'access-control-expose-headers',
'x-captcha-required',
] ]
returnedHeadersFromUnderlyingService.map((headerName) => { returnedHeadersFromUnderlyingService.map((headerName) => {