Created
February 16, 2017 04:34
-
-
Save section-io-gists/2a49ba6d3b3e4dde9283d76c8b56dc53 to your computer and use it in GitHub Desktop.
Split Varnish Cache by the request header X-Forwarded-Proto - Useful when the origin is doing GEO IP redirects or changing content according to protocol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub vcl_hash { | |
#Vary cache by protocol type to avoid caching things like HTTP->HTTPS redirects and different versions of files | |
hash_data(req.http.X-Forwarded-Proto); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment