Skip to content

Commit 3f383ad

Browse files
committed
fix: do not use X-Real-IP
1 parent ab93a86 commit 3f383ad

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

internal/utils/utils.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ func EnvSubst(input string) string {
8484
}
8585

8686
func ReadUserIP(r *http.Request) string {
87-
IPAddress := r.Header.Get("X-Real-Ip")
88-
if IPAddress == "" {
89-
IPAddress = r.Header.Get("X-Forwarded-For")
90-
}
87+
IPAddress := r.Header.Get("X-Forwarded-For")
9188
if IPAddress == "" {
9289
IPAddress = r.RemoteAddr
9390
}

0 commit comments

Comments
 (0)