Skip to content

Commit

Permalink
Minor shared fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Dec 20, 2024
1 parent 7987704 commit 56ff46f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -13201,7 +13201,11 @@ func GetRequestIp(r *http.Request) string {
}

remoteAddrSplit := strings.Split(r.RemoteAddr, ":")
return remoteAddrSplit[0]
if len(remoteAddrSplit) > 0 {
return remoteAddrSplit[0]
}

return r.RemoteAddr

}

Expand Down

0 comments on commit 56ff46f

Please sign in to comment.