core/providers/node/Caddyfile.template
core/providers/node/Caddyfile.templateBrowse 1970 files
265 tokens
962 bytes
Token encoding: o200k_base
Snapshot 21a254f
← Back to SKILL.md
1# global options2{3 admin off4 persist_config off5 auto_https off6 7 log {8 format json9 }10 11 servers {12 trusted_proxies static private_ranges 100.0.0.0/8 # trust railway's proxy13 }14}15 16# site block, listens on the $PORT environment variable, automatically assigned by railway17:{$PORT:80} {18 log {19 format json20 }21 22 respond /health 20023 24 # Security headers25 header {26 # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type27 X-Content-Type-Options "nosniff"28 # Remove Server header29 -Server30 }31 32 # serve from the 'dist' folder (Vite builds into the 'dist' folder)33 root * {{.DIST_DIR}}34 35 # Handle static files36 file_server {37 hide .git38 hide .env*39 }40 41 # Compression with more formats42 encode {43 gzip44 zstd45 }46 47 # match against direct against HTML file matches, folder-level index.html, and optionally fallback to root index.html48 try_files {path} {path}.html {path}/index.html{{if .IndexFallback}} /index.html{{end}}49}50