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

Can't set cookies with Bun #3

Closed
jadbox opened this issue Aug 5, 2024 · 2 comments
Closed

Can't set cookies with Bun #3

jadbox opened this issue Aug 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jadbox
Copy link

jadbox commented Aug 5, 2024

"@nurodev/astro-bun": "^1.1.4",
"astro": "^4.13.1",

If I try to set any cookie in middleware or with an endpoint, it'll work using the development server. However, using the astro build production build, no cookie will get returned from the endpoint. If I switch from Bun to Node adapters, the cookies just work successfully in production. I also found I could use the Node adapter and still run the server with Bun without issue. The problem seems isolated to Bun's special Server package (see import type { Server } from 'bun'; ).

I'm hoping someone may have better luck further troubleshooting than I.

@NuroDev NuroDev self-assigned this Aug 6, 2024
@NuroDev NuroDev added the bug Something isn't working label Aug 6, 2024
@NuroDev
Copy link
Owner

NuroDev commented Aug 6, 2024

Hey @jadbox, thanks for reporting this. I've just published a new version (1.1.5) that should fix this issue.

Looking into the official Node.js adapter it seems there was a few additional options that were missing when rendering each request

@NuroDev NuroDev closed this as completed Aug 6, 2024
@jadbox
Copy link
Author

jadbox commented Aug 6, 2024

@NuroDev thanks for fixing, seems to work now. It took me almost 3 days of debugging before I isolated the issue to not my code. Glad its fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants