caddy-health.snippet
1 # Caddy Health Endpoint Configuration 2 # Add to: /etc/caddy/Caddyfile (ci.ac-dc.network section) 3 # 4 # This serves the runner health status as a public JSON endpoint 5 # No authentication required - contains only non-sensitive operational data 6 7 ci.ac-dc.network { 8 # Health endpoint - serve static JSON file 9 handle /health/* { 10 uri strip_prefix /health 11 root * /var/www/health 12 rewrite * /status.json 13 file_server 14 header Content-Type application/json 15 header Cache-Control "max-age=30" 16 header Access-Control-Allow-Origin "*" 17 } 18 19 # Deny all other requests (CI server has no web UI) 20 handle { 21 respond "Not Found" 404 22 } 23 }