@ Override public String getProtocol ( HttpServletRequest request ) { String proto = request . getHeader ( X_FORWARED_PROTO ) ; if ( proto != null ) return proto ; return super . getProtocol ( request ) ; }
When the X - Forwarded - Proto header is present this method returns the value of that header . When the header is not present it delegates this call to the super class .