1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-03-18 21:57:50 +02:00

[#2372] use Fly-Client-IP header if available for the 'real' user ip

This commit is contained in:
Gani Georgiev 2023-04-27 20:29:59 +03:00
parent 429929dd0c
commit 9fa56b020c

View File

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