From b0612ac6b143e69eace4846cd7419c598836365e Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 31 Dec 2024 20:45:18 +0100 Subject: [PATCH] Config: add 404 and make .html-extension optional --- Docs/ServerConfig/hetzner/Caddyfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Docs/ServerConfig/hetzner/Caddyfile b/Docs/ServerConfig/hetzner/Caddyfile index 71f0fd162..5cc5c95d8 100644 --- a/Docs/ServerConfig/hetzner/Caddyfile +++ b/Docs/ServerConfig/hetzner/Caddyfile @@ -8,10 +8,18 @@ builds.mapcomplete.org { dev.mapcomplete.org { root * public/develop/ + try_files {path}.html file_server header { +Permissions-Policy "interest-cohort=()" } + handle_errors { + @404 { + expression {http.error.status_code} == 404 + } + rewrite @404 /404.html + file_server + } } single.mapcomplete.org {