fix: prevent [No Host] panel errors behind CDN or missing Host header

Force nginx to pass the domain as Host, add PANEL_DOMAIN fallback in Flask,
and document that the admin panel must be accessed over HTTP not HTTPS.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-16 10:28:00 +08:00
parent 6d82c7eb07
commit ba361eb5b8
5 changed files with 57 additions and 3 deletions
+2 -1
View File
@@ -20,10 +20,11 @@ server {
__PANEL_ALLOW__
proxy_pass http://127.0.0.1:5080/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Host __DOMAIN__;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host __DOMAIN__;
proxy_set_header X-Forwarded-Prefix __PANEL_PREFIX__;
}
}