@Override public boolean shouldRedirect(ServletRequest request) { String servletPath = RequestUtils.getServletPathFromRequest((HttpServletRequest) request); servletPath = servletPath.trim(); servletPath = servletPath.toLowerCase(); servletPath = PathUtils.trimLeadingSlashes(servletPath); servletPath = PathUtils.trimTrailingSlashes(servletPath); return servletPath.startsWith("webapp/builds"); }
private boolean isMissionControlAccesPoint(ContainerRequest request) { String baseUrl = request.getBaseUri().toString(); baseUrl = PathUtils.trimLeadingSlashes(baseUrl); baseUrl = PathUtils.trimTrailingSlashes(baseUrl); if (baseUrl.endsWith("/mc")) { return true; } return false; }