You've already forked pocketbase
mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-11-28 08:47:55 +02:00
[#2372] use Fly-Client-IP header if available for the 'real' user ip
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user