0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00
astro/.changeset/dirty-rabbits-act.md
Florian Lefebvre 94ac7efd70
feat(astro): address astro env rfc feedback (#11213)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-06-11 20:17:16 +02:00

626 B

astro
patch

BREAKING CHANGE to the experimental astro:env feature only

Server secrets specified in the schema must now be imported from astro:env/server. Using getSecret() is no longer required to use these environment variables in your schema:

- import { getSecret } from 'astro:env/server'
- const API_SECRET = getSecret("API_SECRET")
+ import { API_SECRET } from 'astro:env/server'

Note that using getSecret() with these keys is still possible, but no longer involves any special handling and the raw value will be returned, just like retrieving secrets not specified in your schema.