"Astro.request.headers was used" warning when rewriting root path #12931
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: routing
Related to Astro routing (scope)
needs response
Issue needs response from OP
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When rewriting from the
/
path to a subpath, Astro prints a warning about request headers being accessed.You can reproduce the issue with the attached repository by running
npm run dev
and then navigating the browser tolocalhost:4321
.The reproduction is the basic Astro template. The only changes I have made is moving
index.astro
to a/en
subfolder and creating a top levelindex.astro
that executes `Astro.rewrite("/en").What's the expected result?
I expect no warning. I'm not accessing the request headers.
Link to Minimal Reproducible Example
https://github.com/si-fab/reproduce-header-warning
Participation
The text was updated successfully, but these errors were encountered: