kicad-mcp/docs-site/Caddyfile
Ryan Malloy eb6cf63b42
Some checks failed
CI / Lint and Format (push) Has been cancelled
CI / Test Python 3.11 on macos-latest (push) Has been cancelled
CI / Test Python 3.12 on macos-latest (push) Has been cancelled
CI / Test Python 3.13 on macos-latest (push) Has been cancelled
CI / Test Python 3.10 on ubuntu-latest (push) Has been cancelled
CI / Test Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Test Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Test Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / Build Package (push) Has been cancelled
docs-site: serve the branded 404 page with a real 404 status
Missing paths returned 404 with an EMPTY body — the built 404.html was
never reached. handle_errors routes 404s to it, status stays honest.
2026-08-11 23:39:40 +00:00

22 lines
622 B
Caddyfile

: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
}
}
}