-
-
Save c33s/819db9871de43f3f0ed16ee7124738e4 to your computer and use it in GitHub Desktop.
If you are using Varnish and ESI with a Symfony application and need to profile not only the master request but with ESI requests included, don't announce your ESI support, Symfony will fallback to internal sub requests.
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
| sub vcl_recv { | |
| if (req.http.X-Blackfire-Query && client.ip ~ profile) { | |
| //set req.backend_hint = backend1; // if you want to disable loadbalancer to profile (aka only 1 backend needs blackfire extension | |
| return (pass); | |
| } else { | |
| // Add a Surrogate-Capability header to announce ESI support. | |
| set req.http.Surrogate-Capability = "abc=ESI/1.0"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment