diff --git a/apis/middlewares.go b/apis/middlewares.go index e5276a5b..5dd74374 100644 --- a/apis/middlewares.go +++ b/apis/middlewares.go @@ -368,6 +368,10 @@ func realUserIp(r *http.Request, fallbackIp string) string { return ip } + if ip := r.Header.Get("Fly-Client-IP"); ip != "" { + return ip + } + if ip := r.Header.Get("X-Real-IP"); ip != "" { return ip }