code: func isInternalURI(c context.Context, uri string) (bool, error) {
  	switch u, err := url.Parse(uri); {
  	case err != nil:
  		return false, fmt.Errorf("auth: could not parse URI %q - %s", uri, err)
  	case u.Scheme != "https":
  		return false, fmt.Errorf("auth: AsProject can be used only with https:// targets, got %q", uri)
  	default:
  		state := GetState(c)
  		if state == nil {
  			return false, ErrNotConfigured
  		}
  		return state.DB().IsInternalService(c, u.Host)
  	}
  }
docs: // isInternalURI returns true if the URI points to a LUCI microservice belonging
  // to the same LUCI deployment as us.
  //
  // Returns an error if the URI can't be parsed, not https:// or there were
  // errors accessing AuthDB to compare the URI against the whitelist.