<p>I am following <a href="https://cloud.google.com/run/docs/quickstarts/prebuilt-deploy-gke" rel="nofollow noreferrer">this</a> tutorial to perform a so called quickstart on <code>gcp</code>'s <code>cloud run</code> and experiment a bit with it.</p>

<p>Some delays and inconsistencies about announced and typical service availability aside, the scripted steps went well.</p>

<p>What I want to ask (couldn't find any documentation or explanation about it) is <strong>why</strong>, in order for me to access the service I need to pass to <code>curl</code> a specific <code>Host</code> header as indicated by the relevant tutorial:</p>

<pre><code>curl -v -H "Host: hello.default.example.com" YOUR-IP
</code></pre>

<p>Where <code>YOUR-IP</code> is the public IP of the Load Balancer created by istio-managed ingress gatewau</p>

<p><a href="https://dzone.com/articles/the-three-http-routing-patterns-you-should-know" rel="nofollow noreferrer">Most proxies</a> that handle external traffic match requests based on the <code>Host</code> header. They use what's inside the <code>Host</code> header to decide which service send the request to. Without the <code>Host</code> header, they wouldn't know where to send the request.</p>

<blockquote>
  <p>Host-based routing is what enables virtual servers on web servers.
  It’s also used by application services like load balancing and ingress
  controllers to achieve the same thing. One IP address, many hosts.</p>
  
  <p>Host-based routing allows you to send a request for api.example.com
  and for web.example.com to the same endpoint with the certainty it
  will be delivered to the correct back-end application.</p>
</blockquote>

<p>That's typical in proxies/load balancers that are multi-tenant, meaning they handle traffic for totally different tenants/applications sitting behind the proxy.</p>
