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