-
-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathCaddyfile
More file actions
34 lines (30 loc) · 1.06 KB
/
Copy pathCaddyfile
File metadata and controls
34 lines (30 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Caddy reverse proxy for loopover (#980 self-host).
# Activated via: docker compose --profile caddy up
#
# DOMAIN is injected from the DOMAIN env var in docker-compose.yml.
# Set DOMAIN=reviews.yourcompany.com in .env — Caddy fetches a TLS cert from Let's Encrypt automatically.
# For local testing without a domain, set DOMAIN=localhost (self-signed cert, browser will warn).
#
# When using this profile, remove the `ports:` entry from the loopover service in docker-compose.yml
# so port 8787 is NOT exposed publicly — all traffic should flow through Caddy on 443.
{$DOMAIN} {
reverse_proxy loopover:8787 {
# Surface the real client IP to the app (logged in access events).
header_up X-Forwarded-For {remote_host}
header_up X-Real-IP {remote_host}
}
# Compress responses.
encode zstd gzip
# Security headers.
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
Referrer-Policy "strict-origin-when-cross-origin"
-Server
}
log {
output stderr
format json
}
}