Skip to content

Commit e652592

Browse files
committed
Update env-configuration.md
1 parent d5fa13c commit e652592

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

docs/getting-started/env-configuration.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,14 @@ The value of `API_KEY_ALLOWED_ENDPOINTS` should be a comma-separated list of end
850850
- Description: Sets the JWT expiration time in seconds. Valid time units: `s`, `m`, `h`, `d`, `w` or `-1` for no expiration.
851851
- Persistence: This environment variable is a `PersistentConfig` variable.
852852

853+
:::warning
854+
855+
Setting `JWT_EXPIRES_IN` to `-1` disables JWT expiration, making issued tokens valid forever. **This is extremely dangerous in production** and exposes your system to severe security risks if tokens are leaked or compromised.
856+
**Always set a reasonable expiration time (e.g., `3600s`, `1h`, etc.) in production to limit the lifespan of authentication tokens.**
857+
Never use `-1` in a production environment.
858+
859+
:::
860+
853861
## Security Variables
854862

855863
#### `ENABLE_FORWARD_USER_INFO_HEADERS`

0 commit comments

Comments
 (0)