From fe3b33a58d9924297adc41b972248f4775f2c5b9 Mon Sep 17 00:00:00 2001 From: Acid Date: Thu, 21 May 2026 18:30:42 -0400 Subject: [PATCH] CF-Connecting-IP --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 2ef667c..ce61e4f 100644 --- a/main.go +++ b/main.go @@ -47,7 +47,10 @@ func handleRoot(w http.ResponseWriter, r *http.Request) { return } - host := r.Header.Get("X-Real-IP") + host := r.Header.Get("CF-Connecting-IP") + if host == "" { + host = r.Header.Get("X-Real-IP") + } if host == "" { host = r.Header.Get("X-Forwarded-For") }