f53f198f03
website/ holds Horizon's site: the horizon-theme tokens and bundled fonts, the launcher's sidebar, rows, buttons and segmented control, over Horizon's own frozen landscape. The parity table, harness count and roadmap are generated from the README at build time; releases, patch notes, the roadmap and links.json are refreshed in the browser from GitHub, with the build's copy as fallback. The download button picks the newest launcher-v* asset for the visitor's OS. Legal: the Minecraft disclaimer in the hero, footer and 404; no Minecraft logo or wordmark; no game files; the launcher's background (licence unconfirmed) and the screenshots showing it are left out; LEGAL.md lists every asset and its licence. No cookies, analytics or third-party assets. Railway: root directory website, Dockerfile (Node build, Caddy on $PORT with a strict CSP). Checked with Playwright at 360-1920 px and 1250x700 (docs/widths/); Lighthouse 96/100/96/92 on mobile, 100/100/96/92 on desktop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.2 KiB
Caddyfile
38 lines
1.2 KiB
Caddyfile
# Serves dist/ on Railway's $PORT. Fingerprinted CSS and JS are cached for a year,
|
|
# media for a week, and the page itself is always revalidated.
|
|
{
|
|
admin off
|
|
auto_https off
|
|
persist_config off
|
|
}
|
|
|
|
:{$PORT:8080} {
|
|
root * /srv
|
|
encode zstd gzip
|
|
|
|
header {
|
|
X-Content-Type-Options nosniff
|
|
Referrer-Policy strict-origin-when-cross-origin
|
|
X-Frame-Options DENY
|
|
Permissions-Policy "interest-cohort=(), browsing-topics=(), camera=(), microphone=(), geolocation=()"
|
|
Content-Security-Policy "default-src 'self'; script-src 'self' {$CSP_SCRIPT}; style-src 'self' {$CSP_STYLE}; img-src 'self' data:; font-src 'self'; connect-src https://api.github.com https://raw.githubusercontent.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self'"
|
|
-Server
|
|
}
|
|
@assets path /assets/*
|
|
header @assets Cache-Control "public, max-age=31536000, immutable"
|
|
@media path /media/* /fonts/* /background.webp /og.png /favicon* /apple-touch-icon.png
|
|
header @media Cache-Control "public, max-age=604800"
|
|
@pages path / /index.html /404.html
|
|
header @pages Cache-Control "no-cache"
|
|
@legal path /LEGAL.md /fonts/*.txt
|
|
header @legal Content-Type "text/plain; charset=utf-8"
|
|
|
|
file_server {
|
|
hide .csp-script .csp-style og.html
|
|
}
|
|
handle_errors {
|
|
rewrite * /404.html
|
|
file_server
|
|
}
|
|
}
|