code: func ClientIP(r *Request) string {
  	if Config.BoolDefault("app.behind.proxy", false) {
  		// Header X-Forwarded-For
  		if fwdFor := strings.TrimSpace(r.GetHttpHeader(HdrForwardedFor)); fwdFor != "" {
  			index := strings.Index(fwdFor, ",")
  			if index == -1 {
  				return fwdFor
  			}
  			return fwdFor[:index]
  		}
  
  		// Header X-Real-Ip
  		if realIP := strings.TrimSpace(r.GetHttpHeader(HdrRealIP)); realIP != "" {
  			return realIP
  		}
  	}
  
  	if remoteAddr, _, err := net.SplitHostPort(r.RemoteAddr); err == nil {
  		return remoteAddr
  	}
  
  	return ""
  }
docs: // ClientIP method returns client IP address from HTTP request.
  //
  // Note: Set property "app.behind.proxy" to true only if Revel is running
  // behind proxy like nginx, haproxy, apache, etc. Otherwise
  // you may get inaccurate Client IP address. Revel parses the
  // IP address in the order of X-Forwarded-For, X-Real-IP.
  //
  // By default revel will get http.Request's RemoteAddr