Make sure X-Forwarded-Proto is set
Needed to cache http and https responses separately via Vary header
This commit is contained in:
parent
ad66745a90
commit
7286dec3ff
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue