diff --git a/global/overlay/etc/puppet/modules/cdn/templates/cache/varnish.vcl.erb b/global/overlay/etc/puppet/modules/cdn/templates/cache/varnish.vcl.erb index 7954311..4232716 100644 --- a/global/overlay/etc/puppet/modules/cdn/templates/cache/varnish.vcl.erb +++ b/global/overlay/etc/puppet/modules/cdn/templates/cache/varnish.vcl.erb @@ -43,11 +43,13 @@ sub vcl_recv { # The usage of the proxy module is possible because haproxy is configured # to set PROXY SSL headers for us. if (proxy.is_ssl()) { + set req.http.X-Forwarded-Proto = "https"; std.syslog(180, "RECV: this is https"); if (req.http.host == "<%= @cache_secrets['customers'][@customer]['host'] %>") { set req.backend_hint = destination_https; } } else { + set req.http.X-Forwarded-Proto = "http"; std.syslog(180, "RECV: this is http"); if (req.http.host == "<%= @cache_secrets['customers'][@customer]['host'] %>") { set req.backend_hint = destination_http;