mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
9284a68ecf
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
23 lines
654 B
Markdown
23 lines
654 B
Markdown
---
|
|
'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.
|
|
|
|
```js
|
|
// astro.config.mjs
|
|
import { defineConfig, envField } from "astro/config"
|
|
|
|
export default defineConfig({
|
|
experimental: {
|
|
env: {
|
|
schema: {
|
|
// ...
|
|
},
|
|
validateSecrets: true
|
|
}
|
|
}
|
|
})
|
|
```
|