From 688b579169858ea15042725343cf4cfe8e9bc5d5 Mon Sep 17 00:00:00 2001 From: didayolo Date: Fri, 26 Jun 2026 13:43:19 +0200 Subject: [PATCH] Add redirection when not in maintenance --- Caddyfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Caddyfile b/Caddyfile index 8774b7381..318d2bfd3 100644 --- a/Caddyfile +++ b/Caddyfile @@ -26,6 +26,15 @@ status 503 } } + # When maintenance ends, redirect stale /maintenance.html requests back to home + @staleMaintenancePage { + path /maintenance.html + not file { + root /srv + try_files maintenance.on + } + } + redir @staleMaintenancePage / 302 # Serves static files, should be the same as `STATIC_ROOT` setting: root * /var/www/django