Caddyfile raw

   1  # Zlattea Caddyfile - auto TLS via Let's Encrypt
   2  # SITE_DOMAIN comes from the caddy environment (see install.sh); defaults to zlattea.smesh.lol
   3  
   4  {$SITE_DOMAIN:zlattea.smesh.lol} {
   5      # API (strips the /api prefix; Hono routes are unprefixed)
   6      handle_path /api/* {
   7          reverse_proxy 127.0.0.1:3001
   8      }
   9  
  10      # everything else -> Astro SSR standalone server (also serves static assets)
  11      handle {
  12          reverse_proxy 127.0.0.1:3002
  13      }
  14  
  15      header {
  16          X-Content-Type-Options "nosniff"
  17          X-Frame-Options "DENY"
  18          Referrer-Policy "strict-origin-when-cross-origin"
  19      }
  20  
  21      log {
  22          output file /var/log/zlattea/caddy-access.log
  23      }
  24  }
  25