code: public boolean accept(String path) {
          if (allow.isEmpty() && deny.isEmpty()) {
              return true;
          }
          // Check if the path is denied
          for (Pattern p : deny) {
              if (p.matcher(path).matches()) {
                  return false;
              }
          }
  
          // Check if the path is accepted
          for (Pattern p : allow) {
              if (p.matcher(path).matches()) {
                  return true;
              }
          }
  
          // Denied by default.
          return !deny.isEmpty();
      }
docs: Checks whether the given path is accepted or rejected by the current server.
  
  @param path the path
  @return {@code true} if the path is accepted, {@code false} otherwise.