diff --git a/services/app-api/src/handlers/third_party_API_authorizer.ts b/services/app-api/src/handlers/third_party_API_authorizer.ts index 0fc4bfb2ce..15ca9d0085 100644 --- a/services/app-api/src/handlers/third_party_API_authorizer.ts +++ b/services/app-api/src/handlers/third_party_API_authorizer.ts @@ -38,9 +38,14 @@ export const main: APIGatewayTokenAuthorizerHandler = async ( const authToken = event.authorizationToken.replace('Bearer ', '') try { const parsedEvent = JSON.parse(JSON.stringify(event)) - const host = parsedEvent.headers[0].Host + console.info( + parsedEvent?.multiValueHeaders?.Host[0], + 'Multivalue header host' + ) + const host = parsedEvent?.multiValueHeaders?.Host[0] + console.info(parsedEvent, '============ PARSED EVENT =============') console.info({ - message: `${parsedEvent.headers.Host}`, + message: `${parsedEvent?.headers}`, operation: 'parsed event', status: 'LOGGED', })