mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
Rewrites our own comments, help text, and example READMEs that named Railway or linked railway.app so they describe what they do instead. Retargets the changelog generator and RELEASE.md's Actions/release links at this repo. Leaves upstream issue links, the MIT copyright, and the builder/runtime/frontend image references untouched -- those still point at ghcr.io/railwayapp because we don't publish our own copies of those images yet. Co-authored-by: Hanzo Dev <[email protected]>
50 lines
987 B
Caddyfile
50 lines
987 B
Caddyfile
# global options
|
|
{
|
|
admin off
|
|
persist_config off
|
|
auto_https off
|
|
|
|
log {
|
|
format json
|
|
}
|
|
|
|
servers {
|
|
trusted_proxies static private_ranges 100.0.0.0/8 # trust the private-range reverse proxy in front of the app
|
|
}
|
|
}
|
|
|
|
# site block, listens on the $PORT environment variable assigned at deploy time
|
|
:{$PORT:80} {
|
|
log {
|
|
format json
|
|
}
|
|
|
|
respond /health 200
|
|
|
|
# Security headers
|
|
header {
|
|
# Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
|
|
X-Content-Type-Options "nosniff"
|
|
# Remove Server header
|
|
-Server
|
|
}
|
|
|
|
# serve from the 'dist' folder (Vite builds into the 'dist' folder)
|
|
root * {{.DIST_DIR}}
|
|
|
|
# Handle static files
|
|
file_server {
|
|
hide .git
|
|
hide .env*
|
|
}
|
|
|
|
# Compression with more formats
|
|
encode {
|
|
gzip
|
|
zstd
|
|
}
|
|
|
|
# match against direct against HTML file matches, folder-level index.html, and optionally fallback to root index.html
|
|
try_files {path} {path}.html {path}/index.html{{if .IndexFallback}} /index.html{{end}}
|
|
}
|