Skip to content
Myr

fix(aws-lambda): set cookies with comma is bugged (#3084)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* fix(aws-lambda): setting cookies with comma is bugged * style: apply lint & format fixes

authored by Trung Dang · committed by GitHub · parent 75c314c · Browse files · 1 file+6 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−1 removed

  • other:+6 added−1 removed

1 file+6 added−1 removed

modified:src/adapter/aws-lambda/handler.ts+6 added-1 removed
256 unmodified lines
257 }258259 setCookies(event: E, res: Response, result: APIGatewayProxyResult) {260 if (res.headers.has('set-cookie')) {261 const cookies = res.headers.get('set-cookie')?.split(', ')261 const cookies = res.headers.getSetCookie262 ? res.headers.getSetCookie()263 : Array.from(res.headers.entries())264 .filter(([k]) => k === 'set-cookie')265 .map(([, v]) => v)266267 if (Array.isArray(cookies)) {268 this.setCookiesToResult(event, result, cookies)269 res.headers.delete('set-cookie')270 }
222 unmodified lines