0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00
astro/.changeset/slow-roses-call.md
Florian Lefebvre 9284a68ecf feat: astro:env validateSecrets (#11337)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-07-18 09:29:02 +01:00

654 B

astro
patch

Adds a new property experimental.env.validateSecrets to allow validating private variables on the server.

By default, this is set to false and only public variables are checked on start. If enabled, secrets will also be checked on start (dev/build modes). This is useful for example in some CIs to make sure all your secrets are correctly set before deploying.

// astro.config.mjs
import { defineConfig, envField } from "astro/config"

export default defineConfig({
    experimental: {
        env: {
            schema: {
                // ...
            },
            validateSecrets: true
        }
    }
})