From d5fee2dca231bde5db0155e66c41d4a2a28f1e23 Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Sat, 26 Sep 2026 00:23:57 -0500 Subject: [PATCH] site: serve the Strata playground as static files under /strata/ Replaces the reverse proxy to strata.zat.dev with static files from /srv/site/strata (immutable hashed assets, 60 s HTML with stale-while-revalidate, gzip sidecars), keeps /strata/api proxied to the summary Worker, and redirects the former /_strata-preview/ route. This is the configuration already running on the host; the committed file matched it byte-for-byte. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Ray8ErT7urWdq3aT9Ka87z --- deploy/site/Caddyfile | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/deploy/site/Caddyfile b/deploy/site/Caddyfile index 51db443..f8e6364 100644 --- a/deploy/site/Caddyfile +++ b/deploy/site/Caddyfile @@ -49,17 +49,35 @@ stream.89-167-122-160.sslip.io, stream.waow.tech { } } - # the archive playground: a cloudflare worker (zat.dev/strata) mounted - # under this host so the archive's site owns it. handle_path strips the - # prefix; the page uses relative urls so it needs the trailing slash. + # Public playground; static assets and a deploy-time summary snapshot. + root * /srv/site redir /strata /strata/ permanent - handle_path /strata/* { - reverse_proxy https://strata.zat.dev { - header_up Host strata.zat.dev + redir /_strata-preview /strata/ permanent + handle_path /_strata-preview/* { + redir * /strata{uri} permanent + } + handle /strata/* { + # Preserve summary API URLs for clients of the former UI. + @strata_api path /strata/api /strata/api/* + handle @strata_api { + uri strip_prefix /strata + reverse_proxy https://strata.zat.dev { + header_up Host strata.zat.dev + } + } + handle /strata/assets/* { + header Cache-Control "public, max-age=31536000, immutable" + file_server { + precompressed gzip + } + } + handle { + header Cache-Control "public, max-age=60, stale-while-revalidate=86400, stale-if-error=604800" + file_server { + precompressed gzip + } } } - - root * /srv/site @home path / /index.html handle @home { header Cache-Control "no-cache" -- 2.51.2