Skip to content

Instantly share code, notes, and snippets.

View magicianlib's full-sized avatar

magicianlib magicianlib

View GitHub Profile
public final class RequestUtils {
private RequestUtils() {
}
private static final String[] PROXY_IP_HEADER_NAMES = new String[]{"X-Forwarded-For", "Proxy-Client-IP", "WL-Proxy-Client-IP"};
public static String getRequestURIWithoutContextPath(HttpServletRequest request) {
String requestUri = request.getRequestURI();
String contextPath = request.getContextPath();