[OPS] Manutenzione flag-gated: .htaccess (503→maintenance.html) + pagina + bypass token
Meccanismo riusabile: presenza di ../.maintenance (gitignored) → ogni richiesta 503 + maintenance.html (mostra la finestra). Bypass ?mnt=<token>/cookie. Accendi: touch .maintenance · Spegni: rm .maintenance. Attivato ora per il revamp UI V3 (~1h). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
b2fa1a163e
commit
2a5d90f8bb
@@ -1,5 +1,17 @@
|
||||
RewriteEngine On
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════════════
|
||||
# MANUTENZIONE (flag-gated): se esiste <docroot>/../.maintenance, OGNI richiesta
|
||||
# → HTTP 503 + maintenance.html. Bypass: ?mnt=<token> o cookie nis2_mnt=<token>.
|
||||
# Accendere: touch ../.maintenance · Spegnere: rm ../.maintenance (istantaneo)
|
||||
# ══════════════════════════════════════════════════════════════════════════
|
||||
ErrorDocument 503 /maintenance.html
|
||||
RewriteCond %{DOCUMENT_ROOT}/../.maintenance -f
|
||||
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
|
||||
RewriteCond %{QUERY_STRING} !(^|&)mnt=efc088d042032889b64b887d2e562ec8(&|$)
|
||||
RewriteCond %{HTTP_COOKIE} !nis2_mnt=efc088d042032889b64b887d2e562ec8
|
||||
RewriteRule ^ - [R=503,L]
|
||||
|
||||
# Pass Authorization header to PHP-FPM
|
||||
RewriteCond %{HTTP:Authorization} .+
|
||||
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
Reference in New Issue
Block a user