make shutdown endpoint default

This commit is contained in:
2025-07-25 00:39:26 +01:00
parent fb4bb63335
commit 50cee580de
5 changed files with 12 additions and 10 deletions

View File

@ -1,9 +1,10 @@
# Backend
Generate random secret using. This secret will be used to authenticate users on all `/admin` routes
Generate random secret using openssl. This secret will be used to authenticate users on all `/admin` routes.
If no secret is given then no authentication will be required
```bash
ADMIN_SECRET=$(openssl rand --base64 32)
nuchat --admin-secret $(openssl rand --base64 32)
```
## Features
@ -11,5 +12,5 @@ ADMIN_SECRET=$(openssl rand --base64 32)
### shutdown
this feature enables an endpoint that allows you to shutdown the server.
**WARNING**: If the `ADMIN_SECRET` env var is not set then this endpoint is completely exposed and allows anyone to shutdown the server.
**WARNING**: If the `admin-secret` flag is not set then this endpoint is completely exposed and allows anyone to shutdown the server.