code: private static String rewritePath(String path) {
          while (path.startsWith("/")) {
              path = path.substring(1);
          }
          // Note, ClassLoader paths are always absolute, so , so no leading slash
          return "resources/" + path;
      }
docs: Rewrites the requested path to remove leading slashes and prefix with
  "resources/"
  
  Note: we don't check for backtracking.
  
  @param path the requested path (e.g. "/foo/bar")
  @return the rewritten path (e.g. "resources/foo/bar")