static checkDomainMatch(domains, hostname) {
    return some(domains, domain => {
      if (isRegExp(domain)) return domain.test(hostname);
      return domain === hostname;
    });
  }
@param {!Array<!string|RegExp>} domains
@param {!string} hostname
@return {!boolean}