protected boolean isProxyCallAllowed(String spec) {
    if (StringUtils.isNotBlank(spec) && getHostPortRestrictionHandler().proxyCallRestricted()) {
      try {
        URL url = new URL(spec);
        return getHostPortRestrictionHandler().allowProxy(url.getHost(),
                                                               Integer.toString(url.getPort() == -1
                                                                                    ? url.getDefaultPort()
                                                                                    : url.getPort()));
      } catch (MalformedURLException ignored) {
        // actual connection attempt will throw
      }
    }

    return true;
  }
Is it allowed to make calls to the supplied url
@param spec the URL
@return
ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java