diff --git a/docs-site/Caddyfile b/docs-site/Caddyfile index e0f8ffe..a788c22 100644 --- a/docs-site/Caddyfile +++ b/docs-site/Caddyfile @@ -8,4 +8,14 @@ @hashed path /_astro/* header @hashed Cache-Control "public, max-age=31536000, immutable" + + # Serve the branded 404 page with a real 404 status. It was already in + # the build, just never reached — Caddy returned an empty error body. + handle_errors { + @404 expression {err.status_code} == 404 + handle @404 { + rewrite * /404.html + file_server + } + } }