Astro Sessions docs improvement #11885
Replies: 2 comments 2 replies
-
Hello! I wonder how common it is for sites to not have an SSL certificate? I do think this is considered pretty standard web practice now, but curious what others have to say about this! |
Beta Was this translation helpful? Give feedback.
-
I don't think I'm the only one who has a test environment on a generated domain for which no SSL certificate is generated. Only when the project is tested and functional do I deploy it on a real domain that already has an SSL certificate. Not to mention that at least I got into this situation and reached out. Consider how many people have gotten into this situation and not solved their problem. Mentioning it in the documentation costs no one anything, but it can help a lot of people. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
After a few hours of debugging, when I was about to jump out of the window, I figured out why Astro Sessions don't work in production with Node Adapter.
Missing SSL certificate!
If anyone runs into a similar problem, it would be nice to have this mentioned in the documentation, that you need to have an SSL certificate generated in production, otherwise Astro Sessions don't work.
Also, I noticed one thing in the documentation when I was looking for what it could be.
https://docs.astro.build/en/guides/sessions/#api-endpoints
The "await" before context.session?.set() is redundant.
For .get() it is correct.
It's in multiple places where .set()
Beta Was this translation helpful? Give feedback.
All reactions