@ Override public String getOriginalHost ( ) { String host = getHeaders ( ) . getFirst ( HttpHeaderNames . X_FORWARDED_HOST ) ; if ( host == null ) { host = getHeaders ( ) . getFirst ( HttpHeaderNames . HOST ) ; if ( host != null ) { // Host header may have a trailing port. Strip that out if it does. host = PTN_COLON . split ( host ) [ 0 ] ; } if ( host == null ) { host = getServerName ( ) ; } } return host ; }
The originally request host . This will NOT include port .