summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/http/handler.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/service/http/handler.go b/service/http/handler.go
index 802de2c2..eeee5e35 100644
--- a/service/http/handler.go
+++ b/service/http/handler.go
@@ -179,6 +179,10 @@ func (h *Handler) resolveIP(r *Request) {
r.RemoteAddr = fetchIP(r.Header.Get("X-Real-Ip"))
}
+ if r.Header.Get("CF-Connecting-IP") != "" {
+ r.RemoteAddr = fetchIP(r.Header.Get("CF-Connecting-IP"))
+ }
+
if r.Header.Get("True-Client-IP") != "" {
r.RemoteAddr = fetchIP(r.Header.Get("True-Client-IP"))
}