Co-authored-by: Claude (Opus 4.6) <claude@hermes.local> Co-committed-by: Claude (Opus 4.6) <claude@hermes.local>
35 lines
780 B
Caddyfile
35 lines
780 B
Caddyfile
# Timmy Tower API — Caddy reverse proxy with automatic HTTPS
|
|
#
|
|
# Usage:
|
|
# 1. Set the TIMMY_DOMAIN env var or replace the placeholder below.
|
|
# 2. Point your DNS A record to this server's public IP.
|
|
# 3. Caddy auto-provisions a Let's Encrypt TLS certificate.
|
|
#
|
|
# If no domain is configured, Caddy listens on :80 (HTTP only).
|
|
|
|
{$TIMMY_DOMAIN:localhost} {
|
|
# Reverse proxy → API server on localhost
|
|
reverse_proxy localhost:8080
|
|
|
|
# Compression
|
|
encode gzip zstd
|
|
|
|
# Security headers
|
|
header {
|
|
X-Content-Type-Options "nosniff"
|
|
X-Frame-Options "DENY"
|
|
Referrer-Policy "strict-origin-when-cross-origin"
|
|
-Server
|
|
}
|
|
|
|
# Access log
|
|
log {
|
|
output file /var/log/caddy/timmy-tower-access.log {
|
|
roll_size 50MiB
|
|
roll_keep 5
|
|
roll_keep_for 720h
|
|
}
|
|
format json
|
|
}
|
|
}
|