This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Timmy-time-dashboard/deploy/Caddyfile

37 lines
878 B
Caddyfile
Raw Normal View History

# ── Timmy Time — Caddy Reverse Proxy ─────────────────────────────────────────
#
# Automatic HTTPS via Let's Encrypt.
# Set DOMAIN env var or replace {$DOMAIN} below.
#
# For local/IP-only access (no domain), Caddy serves on :80 without TLS.
{$DOMAIN:localhost} {
# Reverse proxy to the FastAPI dashboard
reverse_proxy dashboard:8000
# WebSocket support (swarm live updates)
@websocket {
header Connection *Upgrade*
header Upgrade websocket
}
reverse_proxy @websocket dashboard:8000
# Security headers
header {
X-Content-Type-Options nosniff
X-Frame-Options SAMEORIGIN
Referrer-Policy strict-origin-when-cross-origin
X-XSS-Protection "1; mode=block"
-Server
}
# Gzip compression
encode gzip zstd
# Access logging
log {
output stdout
format console
}
}