secret() returns the raw value of a secret. Use it for values that do not travel
through an HTTP API, such as DATABASE_URL, JWT_SECRET, and configuration variables.
The rule
| Secret type | Function | Protected by the proxy |
|---|---|---|
| HTTP API key (OpenAI, Stripe, Resend, etc.) | configure() | Yes |
| Database or configuration value (non-HTTP) | secret() | No |
| Several raw secrets at once | client() | No |
If you pass a non-HTTP target to
configure(), it redirects you to secret(). You always
know which values are protected by the proxy and which are not.