Skip to content

astro:env can't find secrets in middleware #12324

@florian-lefebvre

Description

@florian-lefebvre

Astro Info

N/A

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

No response

Describe the Bug

When using a secret inside a middleware, it now fails

  1. npm run build
  2. npm run preview
  3. visit root

What's the expected result?

Should still work

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-8b8hjn

Participation

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

Metadata

Metadata

Labels

- P4: importantViolate documented behavior or significantly impacts performance (priority)feat: envrelated to the way astro handles `.env` or `import.meta.env` or `process.env` (scope)regression

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions