Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nuxt] proxyRequest with multiple 'set-cookie' headers gets merged into one header #384

Closed
Mokkapps opened this issue May 9, 2023 · 3 comments

Comments

@Mokkapps
Copy link

Mokkapps commented May 9, 2023

Environment

Nuxt: 3.4.3
Node: 18.14.2

Reproduction

https://stackblitz.com/github/Mokkapps/nuxt-multiple-set-cookie?file=server/api/upstream.ts

Describe the bug

Current Behaviour

Only one set-cookie is returned from the proxyRequest response:

export default defineEventHandler((event) => {
  return proxyRequest(
    event,
    "https://7dzqb4dvrf.execute-api.eu-central-1.amazonaws.com/dev"
  );
});

The endpoint response which contains multiple set-cookie response headers:

image

The proxyRequest response only contains the last set-cookie header:

image

Expected Behaviour

proxyRequest proxies all set-cookie response headers

Additional context

No response

Logs

No response

@Mokkapps Mokkapps changed the title proxyRequest with multiple 'set-cookie' headers gets merged into one header [nuxt] proxyRequest with multiple 'set-cookie' headers gets merged into one header May 9, 2023
@PunkPengu
Copy link

same problem here :( hope it will get fixed soon!

@oleghalin
Copy link
Contributor

See unjs/nitro#989

@pi0
Copy link
Member

pi0 commented Jun 20, 2023

Hi. For proxy we do split cookies but there was a bug with node fetch (#408).

Please let me know if this still needs investigation in h3. (nitro PR is separate issue to track)

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

No branches or pull requests

4 participants