Checks that at least one surrogate has ESI/1.0 capability.
Request $request A Request instance:
Boolean true if one surrogate has ESI/1.0 capability, false otherwise
public function hasSurrogateEsiCapability(Request $request) {
if (null === ($value = $request->headers
->get('Surrogate-Capability'))) {
return false;
}
return false !== strpos($value, 'ESI/1.0');
}