Last active
November 12, 2015 14:04
-
-
Save ThijsFeryn/2e06e3596d41e4ff3dda to your computer and use it in GitHub Desktop.
VCL snippet that contains the minimum amount of config to support ESI using Surrogate headers
This file contains hidden or 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
vcl 4.0; | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
sub vcl_recv { | |
set req.http.Surrogate-Capability = "key=ESI/1.0"; | |
} | |
sub vcl_backend_response { | |
if (beresp.http.Surrogate-Control ~ "ESI/1.0") { | |
unset beresp.http.Surrogate-Control; | |
set beresp.do_esi = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment