-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
48 lines (42 loc) · 2.57 KB
/
Copy pathCaddyfile
File metadata and controls
48 lines (42 loc) · 2.57 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# ─────────────────────────────────────────────────────────────────────────────
# Caddy reverse proxy config for otdb.th-deg.de
# Replace the domain below with your actual subdomain.
# Caddy automatically provisions Let's Encrypt SSL certificates.
# ─────────────────────────────────────────────────────────────────────────────
otdb.th-deg.de {
# ── Backend API ──────────────────────────────────────────────────────────
reverse_proxy /api/* backend:8000
reverse_proxy /health backend:8000
reverse_proxy /docs backend:8000
reverse_proxy /redoc backend:8000
reverse_proxy /openapi.json backend:8000
reverse_proxy /project-docs/* backend:8000
# ── Legal pages (clean URLs without .html extension) ────────────────────
rewrite /privacy /privacy.html
rewrite /impressum /impressum.html
rewrite /terms /terms.html
rewrite /consent /consent.html
rewrite /disclaimer /disclaimer.html
rewrite /acknowledgements /acknowledgements.html
# ── Static frontend (SPA) ───────────────────────────────────────────────
reverse_proxy frontend:80
# ── Security headers (applied to all routes) ─────────────────────────────
header / {
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
Referrer-Policy "strict-origin-when-cross-origin"
}
# ── Logs ────────────────────────────────────────────────────────────────
log {
output file /data/access.log
format json
}
}
# ── Dev / local override (uncomment for local testing) ─────────────────────
# http://localhost {
# reverse_proxy /api/* backend:8000
# reverse_proxy /health backend:8000
# reverse_proxy /docs backend:8000
# reverse_proxy /redoc backend:8000
# reverse_proxy frontend:80
# }