docs: private String removePathFromUrl(String url) {
          String path = extractPathFromUrl(url);
          int end = url.indexOf(path);
          return url.substring(0, end);
  
          // Alternative: return url.replaceAll("(?<=:[0-9]{1,5})/.*", "")), assume url contains port number
      }