diff --git a/main.go b/main.go index ac5be90..e380489 100644 --- a/main.go +++ b/main.go @@ -441,7 +441,8 @@ func handleTraefik(w http.ResponseWriter, r *http.Request) { if len(matches) > 0 { checkBlocked.Inc() - http.Error(w, "blocked", http.StatusForbidden) + errorhtml(w, r) + //http.Error(w, "blocked", http.StatusTooManyRequests) return } w.WriteHeader(http.StatusOK) @@ -650,3 +651,144 @@ func handleGUI(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") _, _ = w.Write([]byte(html)) } + +func errorhtml(w http.ResponseWriter, r *http.Request) { + html := ` + + + + + Webserver ist nicht erreichbar - Fehler 521 + + + +
+
+

Webserver ist nicht erreichbar

+ Fehlercode 521 (Origin Server verweigert Verbindung) +
+

+ Dein Browser funktioniert, der Edge-Proxy ist erreichbar - aber der Origin-Server antwortet nicht oder die Verbindung wird verweigert. +

+ +
+ +
+ +

Du

+

Browser

+

Funktioniert

+
+ + +
+ +

Edge-Proxy

+

Zwischenschicht

+

Funktioniert

+
+ + +
+ +

Host

+

Origin-Server

+

Fehler

+
+
+ +
+ + +
+ +
+ Technische Details + +

Tipps: Prüfe, ob dein Backend erreichbar ist (TCP/443 oder 80), ob der Dienst läuft und ob eine Firewall/Fail2ban/Rate-Limit die Proxy-IP blockiert.

+
+ + +
+ + + +` + + w.Header().Set("Content-Type", "text/html; charset=utf-8") + _, _ = w.Write([]byte(html)) +}