code: function getPathHostName(origin, path) {
    const pathOverride = {
      '/oauth/userinfo': `https://${origin}.battle.net`,
    };
  
    return Object.prototype.hasOwnProperty.call(pathOverride, path) ? pathOverride[path] : endpoints[origin].hostname;
  }
docs: Get the hostname of a path that may be overridden.
  
  @param {String} origin A regional origin
  @param {String} [path] The requested API path
  @return {String} The valid hostname for the current path