Skip to content

[WARN] Astro.request.headers is not available in "static" output mode. #10212

@mrcnski

Description

@mrcnski

Astro Info

Astro                    v4.4.3
Node                     v21.5.0
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

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

No response

Describe the Bug

Since upgrading to Astro 4.4.3 I'm getting this warning in the console:

[WARN] `Astro.request.headers` is not available in "static" output mode. To enable header access: set `output: "server"` or `output: "hybrid"` in your config file.

What's the expected result?

I was not getting this warning on Astro 4.3.7.

I'm not doing anything with headers AFAIK, but it would be nice to have a trace to know where this warning is coming from.

I tried for some time but I'm having trouble reproducing this on Stackblitz or in a fresh project. As mentioned above, a trace would be nice. My project is simple, my only dependencies are Astro and Typescript.

Link to Minimal Reproducible Example

https://stackblitz.com/see-above

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions