-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
38 lines (32 loc) · 857 Bytes
/
Caddyfile
File metadata and controls
38 lines (32 loc) · 857 Bytes
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
# Production Caddyfile
# Set DOMAIN env var for HTTPS, otherwise serves HTTP on port 80
{$DOMAIN::80} {
# Automatic HTTPS with Let's Encrypt
# (only works with real domain, not localhost)
# Reverse proxy to Nuxt app
reverse_proxy app:3000 {
# Health check
health_uri /api/health
health_interval 30s
# Headers
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
}
# Compression
encode gzip zstd
# Security headers
header {
X-Content-Type-Options nosniff
X-Frame-Options DENY
Referrer-Policy strict-origin-when-cross-origin
-Server
}
# Logging
log {
output file /data/access.log {
roll_size 10mb
roll_keep 5
}
}
}