コード例 #1
0
 @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");
 }
コード例 #2
0
 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;
 }