Description
Description
This came up internally in Slack. There are cases where users configure their Astro app as server
(i.e. SSR) but explicitly set some pages as static pages (i.e. opt out of SSR). Our Astro middleware is injected if we find a server
-configuration.
Now in case of requests being made to static pages, our middleware accesses properties in the middleware context that should only be accessed in SSR routes. As a result, the server logs warnings:
`Astro.request.headers` is unavailable in "static" output mode, and in perendered pages within "hybrid" and "server" output modes.
We need to somehow find a flag to check in the middleware if the route we’re accessing is static vs. SSR. And if static, we bail and don’t touch the headers
Metadata
Metadata
Assignees
Type
Projects
Status
No status