mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Support x-forwarded-for headers for IPs (#4684)
* feat: Support x-forwarded-for headers for IPs Fixes #4430. * Fix realip accepting headers * Fix unused headers
This commit is contained in:
+1
-2
@@ -117,8 +117,7 @@ func (api *API) generateFakeAuditLog(rw http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
ipRaw, _, _ := net.SplitHostPort(r.RemoteAddr)
|
||||
ip := net.ParseIP(ipRaw)
|
||||
ip := net.ParseIP(r.RemoteAddr)
|
||||
ipNet := pqtype.Inet{}
|
||||
if ip != nil {
|
||||
ipNet = pqtype.Inet{
|
||||
|
||||
Reference in New Issue
Block a user