From ffae8abba0a5e14ca1b29345fd2881d193a33dd7 Mon Sep 17 00:00:00 2001 From: collin Date: Tue, 2 Sep 2025 17:10:56 +0200 Subject: [PATCH] Trying "X-Forwarded-For" header for visit --- controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller.go b/controller.go index 2b6eb67..ea8715e 100644 --- a/controller.go +++ b/controller.go @@ -160,7 +160,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { getStaticFile("./client/favicon.ico", "image/png", w) case r.Method == "GET" && r.URL.Path == "/": - visit := h.visits.HandleVisit(r.RemoteAddr) + visit := h.visits.HandleVisit(r.Header.Get("X-Forwarded-For")) if visit != nil { h.ntfy.PublishNewVisitNotification(visit) }