code: func RemoteAddress(r *http.Request) (string, bool) {
  	hdr := r.Header
  
  	// Try to obtain the ip from the X-Forwarded-For header
  	ip := hdr.Get("X-Forwarded-For")
  	if ip != "" {
  		// X-Forwarded-For is potentially a list of addresses separated with ","
  		parts := strings.Split(ip, ",")
  		if len(parts) > 0 {
  			ip = strings.TrimSpace(parts[0])
  
  			if ip != "" {
  				return ip, false
  			}
  		}
  	}
  
  	// Try to obtain the ip from the X-Real-Ip header
  	ip = strings.TrimSpace(hdr.Get("X-Real-Ip"))
  	if ip != "" {
  		return ip, false
  	}
  
  	// Fallback to the request remote address
  	return RemovePortFromRemoteAddr(r.RemoteAddr), true
  }
docs: // RemoteAddress returns the IP address of the request.
  // If the X-Forwarded-For or X-Real-Ip http headers are set, then
  // they are used to obtain the remote address.
  // The boolean is true, if the remote address is obtained using the
  // request RemoteAddr() method.