You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand Varnish is supposed to be transparent, so why is the original Host request header replaced with backend's host:port in default configuration (default.vcl, lines 37-42)?
The text was updated successfully, but these errors were encountered:
I understand Varnish is supposed to be transparent
What gave you that idea? :-)
TL;DR: it caters to the most common case for beginners.
As the default.vcl is really an entry-level solution so that new users don't have to write code to plug into their origin. From experience, users tend to discover the solution locally and just visit http://127.0.0.1, so aligning the host header with the host name prevents a bunch of issues where the origin returns a 400 or 404.
That being said, there's a case to be made about allowing a different host header with an environment variable, and I'm very happy to review PRs coming my way.
As always, I'm open to counter-arguments, I might very well have missed a factor in this discussion
I understand Varnish is supposed to be transparent, so why is the original
Host
request header replaced with backend'shost:port
in default configuration (default.vcl, lines 37-42)?The text was updated successfully, but these errors were encountered: