mirror of
https://github.com/owncast/owncast.git
synced 2024-10-23 04:55:56 +03:00
Do not try to split ip and port of x-forwarded-for addresses
This commit is contained in:
parent
bcf4cb09e7
commit
a7d9e2719a
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ func GetIPAddressFromRequest(req *http.Request) string {
|
|||
ipAddressString := req.RemoteAddr
|
||||
xForwardedFor := req.Header.Get("X-FORWARDED-FOR")
|
||||
if xForwardedFor != "" {
|
||||
ipAddressString = xForwardedFor
|
||||
return xForwardedFor
|
||||
}
|
||||
|
||||
ip, _, err := net.SplitHostPort(ipAddressString)
|
||||
|
|
Loading…
Reference in a new issue