Skip to content
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

Erroneous warning about Astro.request.headers #12496

Closed
1 task
denschub opened this issue Nov 22, 2024 · 1 comment · Fixed by #12498
Closed
1 task

Erroneous warning about Astro.request.headers #12496

denschub opened this issue Nov 22, 2024 · 1 comment · Fixed by #12498
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) regression

Comments

@denschub
Copy link

Astro Info

Astro                    v4.16.14
Node                     v18.20.3
System                   Linux (x64)
Package Manager          unknown
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

The bug described in #12202 happens again. During astro build, there's an erroneous warning:

[WARN] Astro.request.headers is unavailable in "static" output mode, and in prerendered pages within "hybrid" and "server" output modes. If you need access to request headers, make sure that output is configured as either "server" or output: "hybrid" in your config file, and that the page accessing the headers is rendered on-demand.

Despite the code not using Astro.request.headers. This worked in 4.16.13, but in 4.16.14, the warning is back.

What's the expected result?

No warning should be shown. :)

Link to Minimal Reproducible Example

https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal?file=README.md

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 22, 2024
@denschub denschub changed the title Erroneous arning about Astro.request.headers Erroneous warning about Astro.request.headers Nov 22, 2024
@ematipico ematipico added - P4: important Violate documented behavior or significantly impacts performance (priority) regression labels Nov 22, 2024
@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Nov 22, 2024
@ematipico ematipico self-assigned this Nov 22, 2024
@denschub
Copy link
Author

Thanks for the quick fix, @ematipico. Y'alls work is appreciated. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants