code: function removeUrlPath (uri) {
    var parsed = url.parse(uri);
    if (parsed.host) {
      delete parsed.pathname;
    }
    return url.format(parsed);
  }
docs: remove path from url
  @param  {string} uri  full url
  @return {string} uriWithoutPath