Skip to content

Commit

Permalink
fix: do not use X-Real-IP
Browse files Browse the repository at this point in the history
  • Loading branch information
bartjkdp committed Feb 20, 2024
1 parent ab93a86 commit 3f383ad
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions internal/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ func EnvSubst(input string) string {
}

func ReadUserIP(r *http.Request) string {
IPAddress := r.Header.Get("X-Real-Ip")
if IPAddress == "" {
IPAddress = r.Header.Get("X-Forwarded-For")
}
IPAddress := r.Header.Get("X-Forwarded-For")
if IPAddress == "" {
IPAddress = r.RemoteAddr
}
Expand Down

0 comments on commit 3f383ad

Please sign in to comment.