:80 { root * /srv file_server try_files {path} {path}/index.html {path}/ @nocache path /robots.txt /sitemap-index.xml /sitemap-*.xml header @nocache Cache-Control "no-cache, max-age=0" @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 } } }