How to get the current hostname in VCL?
If I use req.http.host
in the src
parameter of a header, I get the hostname of the backend.
How can I get the request hostname instead?
I’d like to not have to hardcode my domain.
Thanks!
-
If you are trying to get information about the origin, this help guide my be useful as well - Tracking you origin's name, ip, and port
-
analogue in which subroutine you are setting set req.http.original_host = req.http.host.
Please sign in to leave a comment.
Comments
4 comments