Skip to content

Commit

Permalink
try the multValue header instead
Browse files Browse the repository at this point in the history
  • Loading branch information
pearl-truss committed Feb 1, 2024
1 parent 708cd95 commit 5558d8d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions services/app-api/src/handlers/third_party_API_authorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})
Expand Down

0 comments on commit 5558d8d

Please sign in to comment.