docs: add Caddy configuration example

This commit is contained in:
Chris
2025-09-11 09:33:54 +02:00
committed by GitHub
parent 98e92d0c13
commit a98d0c2616
+21 -1
View File
@@ -191,7 +191,9 @@ The `allowed_*` properties are optional, the default value for each of them will
### Reverse Proxy Service ### Reverse Proxy Service
When using a reverse proxy implementation, like Caddy, Nginx, or Apache, note that you need to forward the correct headers in order to avoid 502 errors. Here's a Nginx configuration example: When using a reverse proxy implementation, like Caddy, Nginx, or Apache, note that you need to forward the correct headers in order to avoid 502 errors.
#### Nginx Configuration Example
```nginx ```nginx
location / { location / {
@@ -212,6 +214,24 @@ location / {
} }
``` ```
#### Caddy Configuration Example
```Caddyfile
example.com {
tls internal # for local development
# tls [email protected] # so that Caddy gets certs for you via Letsencrypt
# Rewrites destination to remove host and include only the path e.g. /test.txt
@hasDest header_regexp dest ^https?://[^/]+(.*)$
header @hasDest Destination {re.dest.1}
reverse_proxy 127.0.0.1:6065 { # if running on the same network in docker you can just point to the service name e.g. webdav:6065
header_up X-Real-IP {remote_host}
header_up REMOTE-HOST {remote_host}
}
}
```
## Examples ## Examples
### Systemd ### Systemd