README: add Caddy reverse proxy example
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
20
README.md
20
README.md
@@ -71,9 +71,25 @@ docker compose run --rm register-user --username alice --password secret
|
|||||||
| `COOKIE_SECURE` | `false` | Set `true` when serving over HTTPS |
|
| `COOKIE_SECURE` | `false` | Set `true` when serving over HTTPS |
|
||||||
| `TRUST_PROXY` | `false` | Set `true` when behind a reverse proxy |
|
| `TRUST_PROXY` | `false` | Set `true` when behind a reverse proxy |
|
||||||
|
|
||||||
### Reverse proxy (nginx example)
|
### Reverse proxy
|
||||||
|
|
||||||
When running behind nginx, set `TRUST_PROXY=true` so Nanodrop sees the real client IP in logs.
|
Set `TRUST_PROXY=true` when running behind a reverse proxy so Nanodrop sees the real client IP in logs.
|
||||||
|
|
||||||
|
**Caddy** (`Caddyfile`):
|
||||||
|
|
||||||
|
```caddy
|
||||||
|
files.example.com {
|
||||||
|
reverse_proxy localhost:3000
|
||||||
|
|
||||||
|
request_body {
|
||||||
|
max_size 110MB
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Caddy sets `X-Forwarded-For` and handles TLS automatically. Set `COOKIE_SECURE=true` since traffic to the app arrives over HTTPS.
|
||||||
|
|
||||||
|
**nginx** (`sites-available/nanodrop`):
|
||||||
|
|
||||||
```nginx
|
```nginx
|
||||||
server {
|
server {
|
||||||
|
|||||||
Reference in New Issue
Block a user