public function Ssi::addSurrogateControl in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-kernel/HttpCache/Ssi.php \Symfony\Component\HttpKernel\HttpCache\Ssi::addSurrogateControl()
Adds HTTP headers to specify that the Response needs to be parsed for Surrogate.
This method only adds an Surrogate HTTP header if the Response has some Surrogate tags.
Parameters
Response $response A Response instance:
Overrides SurrogateInterface::addSurrogateControl
File
- vendor/
symfony/ http-kernel/ HttpCache/ Ssi.php, line 84
Class
- Ssi
- Ssi implements the SSI capabilities to Request and Response instances.
Namespace
Symfony\Component\HttpKernel\HttpCacheCode
public function addSurrogateControl(Response $response) {
if (false !== strpos($response
->getContent(), '<!--#include')) {
$response->headers
->set('Surrogate-Control', 'content="SSI/1.0"');
}
}