Trying "X-Forwarded-For" header for visit

This commit is contained in:
collin 2025-09-02 17:10:56 +02:00
parent 9dab909103
commit ffae8abba0
No known key found for this signature in database

View file

@ -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)
}