-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Middleware: unclear that reading cookies/headers behaviour #8264
Comments
Hi @thomasledoux1 ! The documentation that describes Cookies/Headers as an on-demand/SSR rendered feature is here: https://docs.astro.build/en/guides/server-side-rendering/#on-demand-rendering-features We have actually been discussing internally that we don't have a (any? 😅 ) examples showing use of middleware in a static site, so we also haven't really documented well on that page the difference. What would you think about adding to the original first sentence on the middleware page, something like:
Do you think that addresses the issue? If so, I'd be happy to receive a docs PR to that page! |
📚 Subject area/topic
Middleware
📋 Page(s) affected (or suggested, for new content)
https://docs.astro.build/en/guides/middleware/
📋 Description of content that is out-of-date or incorrect
At the moment in my opinion it is not clear that you can not read cookies/headers from the
context
in middleware when you are request a static page.I'm not sure where exactly this information could be highlighted, but I couldn't figure this out from the existing docs.
I first created an issue in the
astro
repo withastro/astro#11023🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response
The text was updated successfully, but these errors were encountered: