Files
de-praxis/deploy/Caddyfile
T
juli adaee5b536 Move the relay's default port to 1337
Server default, Caddy upstream, env template, smoke scripts and docs.
2026-10-25 00:08:13 +02:00

46 lines
973 B
Caddyfile

{
servers {
max_header_size 16KB
timeouts {
read_header 5s
read_body 10s
write 45s
idle 30s
}
}
}
# Replace with your actual domain. Caddy manages HTTPS certificates and renewal.
relay.example.com {
request_body {
max_size 16KB
}
header {
Strict-Transport-Security "max-age=31536000"
X-Content-Type-Options nosniff
Referrer-Policy no-referrer
-Server
}
# Allowlist game routes. Never proxy the administration surface publicly.
@game path /health /rooms /rooms/*
handle @game {
reverse_proxy 127.0.0.1:1337 {
# Tiny bounded JSON requests are fully received before occupying a Java worker.
request_buffers 16KB
unhealthy_request_count 32
# Replace untrusted client-supplied forwarding headers.
header_up X-Real-IP {remote_host}
header_up X-Forwarded-Proto {scheme}
transport http {
dial_timeout 3s
response_header_timeout 40s
max_conns_per_host 64
}
}
}
handle {
respond "Not found" 404
}
}