Skip to content

Commit

Permalink
refactor(aws-lambda): remove unused setHeadersToResult (#2828)
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego authored May 29, 2024
1 parent 645b4f2 commit 0735e0c
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/adapter/aws-lambda/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,26 +379,7 @@ class ALBProcessor extends EventProcessor<ALBProxyEvent> {
}
return headers
}
protected setHeadersToResult(
event: ALBProxyEvent,
result: APIGatewayProxyResult,
headers: Headers
): void {
// When multiValueHeaders is present in event set multiValueHeaders in result
if (event.multiValueHeaders) {
const multiValueHeaders: { [key: string]: string[] } = {}
for (const [key, value] of headers.entries()) {
multiValueHeaders[key] = [value]
}
result.multiValueHeaders = multiValueHeaders
} else {
const singleValueHeaders: Record<string, string> = {}
for (const [key, value] of headers.entries()) {
singleValueHeaders[key] = value
}
result.headers = singleValueHeaders
}
}

protected getPath(event: ALBProxyEvent): string {
return event.path
}
Expand Down

0 comments on commit 0735e0c

Please sign in to comment.