public function Esi::addSurrogateCapability in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/HttpCache/Esi.php \Symfony\Component\HttpKernel\HttpCache\Esi::addSurrogateCapability()
Adds ESI/1.0 capability to the given Request.
Parameters
Request $request A Request instance:
Overrides SurrogateInterface::addSurrogateCapability
1 call to Esi::addSurrogateCapability()
- Esi::addSurrogateEsiCapability in vendor/
symfony/ http-kernel/ HttpCache/ Esi.php - Adds ESI/1.0 capability to the given Request.
File
- vendor/
symfony/ http-kernel/ HttpCache/ Esi.php, line 100
Class
- Esi
- Esi implements the ESI capabilities to Request and Response instances.
Namespace
Symfony\Component\HttpKernel\HttpCacheCode
public function addSurrogateCapability(Request $request) {
$current = $request->headers
->get('Surrogate-Capability');
$new = 'symfony2="ESI/1.0"';
$request->headers
->set('Surrogate-Capability', $current ? $current . ', ' . $new : $new);
}