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

about netlify functions MultiValueHeaders #1058

Closed
4 tasks done
issue-up bot opened this issue Mar 15, 2023 · 5 comments
Closed
4 tasks done

about netlify functions MultiValueHeaders #1058

issue-up bot opened this issue Mar 15, 2023 · 5 comments

Comments

@issue-up
Copy link

issue-up bot commented Mar 15, 2023

   Forwarded from downstream issue:


Describe the feature

I am using @sidebase/nuxt-auth, and deploy to netlify.

but the __Secure-next-auth.state and __Secure-next-auth.session-token in one 'set cookie'

moreinfo :https://answers.netlify.com/t/multiple-set-cookie-headers-cause-netlify-lambda-to-throw-an-error/975/3

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

@pi0
Copy link
Member

pi0 commented Mar 15, 2023

(closing until there is a nitro repro)

@pi0 pi0 closed this as completed Mar 15, 2023
@becem-gharbi
Copy link
Contributor

becem-gharbi commented May 21, 2023

When adding multiple set-cookie headers on response, it seems that cookies are overwritten or merged. This behaviour happends on Netlify and Cloudflare as far as i know with Nitro v2.4.1. Works fine on Vercel.

export default eventHandler((event) => {
  setCookie(event, "cookie_1", "cookie_1_value");
  setCookie(event, "cookie_2", "cookie_2_value");
  return { nitro: "Is Awesome!" };
});

On development

image

On production

image

@KeJunMao
Copy link

KeJunMao commented Aug 7, 2023

@becem-gharbi hi, Sorry to be here @ You, Do you have any solutions with Netlify?

@Hebilicious
Copy link
Member

@KeJunMao I believe this got fixed in #1452

@becem-gharbi
Copy link
Contributor

Thanks

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