Closed calmh closed 6 years ago
The (*http.Request).RemoteAddr field contains the remote address with port, so the plain ParseIP call always failed. This adds a helper function that strips the port, yet also works if given an address without port.
The (*http.Request).RemoteAddr field contains the remote address with port, so the plain ParseIP call always failed. This adds a helper function that strips the port, yet also works if given an address without port.