aae60c16ba
- /releases: every game and launcher release on one page, newest first, Stable / Alpha / Launcher marked and filterable. The newest three are open; each shows what it added and fixed, the full notes, its downloads and a link to GitHub. Baked at build time, refreshed from GitHub when a newer release is out. /releases#release-<tag> opens one. - Home: "Recently added" replaces the patch notes block: the last five releases on one line each and three highlights from what they added. - /benchmarks: Horizon against vanilla Java Edition 26.3 measured on our machines (average FPS, 1% lows, p95 frame time, start to world, chunk loads, memory, at render distance 12 and 32), saying where Java is ahead; a GPU + CPU picker that shows a measurement when there is one and otherwise a marked estimate with a range, from our own spec table (method explained on the page); players' results read live from the telemetry server's GET /v1/benchmarks/summary, falling back to the baked public/benchmarks.json, groups of 3+ installs only. - scripts/benchmarks.mjs builds public/benchmarks.json from our reports (and, for tests, telemetry items) with the same rules as the server; fixtures shared with the server's test. - Releases and Benchmarks in the nav and footer; docs/performance.md links the page. - Pixelify Sans' "fi" ligature drew "fixes" as "Axes": common ligatures off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
51 lines
2.0 KiB
Caddyfile
51 lines
2.0 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. The site lives at
|
|
# https://playhorizon.dev: Railway's own *.up.railway.app address redirects there, so the
|
|
# page is indexed once. Railway's healthcheck (Host: healthcheck.railway.app) is still served.
|
|
{
|
|
admin off
|
|
auto_https off
|
|
persist_config off
|
|
}
|
|
|
|
:{$PORT:8080} {
|
|
root * /srv
|
|
|
|
@railway header_regexp Host ^[^.]+\.up\.railway\.app(:[0-9]+)?$
|
|
redir @railway https://playhorizon.dev{uri} permanent
|
|
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: https://avatars.githubusercontent.com; font-src 'self'; connect-src 'self' https://api.github.com https://raw.githubusercontent.com https://telemetry.playhorizon.dev; 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/* /og.png /favicon* /apple-touch-icon.png
|
|
header @media Cache-Control "public, max-age=604800"
|
|
# The server guide became a section of the documentation.
|
|
redir /server /docs/hosting permanent
|
|
redir /server.html /docs/hosting permanent
|
|
rewrite /privacy /privacy.html
|
|
rewrite /releases /releases.html
|
|
rewrite /benchmarks /benchmarks.html
|
|
@doc path_regexp doc ^/docs/([a-z-]+)$
|
|
rewrite @doc /docs/{re.doc.1}.html
|
|
@pages path / /index.html /404.html /privacy.html /releases /releases.html /benchmarks /benchmarks.html /benchmarks.json /docs /docs/* /sitemap.xml
|
|
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
|
|
}
|
|
}
|