Skip to content

fix(response): preserve native response cookies - #139

Open
bun-unsafe wants to merge 1 commit into
adonisjs:9.xfrom
bun-unsafe:fix/f-http-native-response-cookies
Open

fix(response): preserve native response cookies#139
bun-unsafe wants to merge 1 commit into
adonisjs:9.xfrom
bun-unsafe:fix/f-http-native-response-cookies

Conversation

@bun-unsafe

Copy link
Copy Markdown

Problem

When HttpResponse#send() receives a web-native Response, its multiple Set-Cookie headers are collapsed into one. The native cookie also replaces cookies already set through Adonis response APIs.

Fix

Read cookies with Headers#getSetCookie() and append them separately, preserving all native cookies and existing response cookies.

Testing

  • npm run quick:test
  • npm run typecheck
  • npm run lint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant