Astro Info
Astro v6.4.6
Node v22.22.3
System Linux (x64)
Package Manager unknown
Output server
Adapter @astrojs/node
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
For my hybrid-page (output server with some static pages) I need to set security.allowedDomains.
Every static page (export const prerender=true) produce a warning:
[WARN] `Astro.request.headers` was used when rendering the route `src/pages/index.astro'`. `Astro.request.headers` is not available on prerendered pages. If you need access to request headers, make sure that the page is server-rendered using `export const prerender = false;` or by setting `output` to `"server"` in your Astro config to make all your pages server-rendered by default.
In the end this is only a warning, that can be ignored, but it is hard to find "real" issues, if there is accidentally a access to the headers for static pages.
The warning is also visible in dev-server and access is from the #applyForwardedHeader
Reproduction link is the minimal example with output: 'server', security.allowedDomains and page/index.ts with prerender=true
What's the expected result?
Static pages should not create a warning from the allowedDomain check. Maybe the check can competely skip for prerendered pages?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-bfeujqd3
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
For my hybrid-page (output server with some static pages) I need to set
security.allowedDomains.Every static page (
export const prerender=true) produce a warning:In the end this is only a warning, that can be ignored, but it is hard to find "real" issues, if there is accidentally a access to the headers for static pages.
The warning is also visible in dev-server and access is from the #applyForwardedHeader
Reproduction link is the minimal example with
output: 'server',security.allowedDomainsand page/index.ts withprerender=trueWhat's the expected result?
Static pages should not create a warning from the allowedDomain check. Maybe the check can competely skip for prerendered pages?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-bfeujqd3
Participation