protected String getRemoteAddr ( ApiRequest request , IPListConfig config ) { String httpHeader = config . getHttpHeader ( ) ; if ( httpHeader != null && httpHeader . trim ( ) . length ( ) > 0 ) { String value = ( String ) request . getHeaders ( ) . get ( httpHeader ) ; if ( value != null ) { return value ; } } return request . getRemoteAddr ( ) ; }
Gets the remote address for comparison .