function Response::setVary
Sets the Vary header.
@final
Parameters
bool $replace Whether to replace the actual value or not (true by default):
Return value
$this
1 call to Response::setVary()
- Response::setContentSafe in vendor/
symfony/ http-foundation/ Response.php - Marks a response as safe according to RFC8674.
File
-
vendor/
symfony/ http-foundation/ Response.php, line 1095
Class
- Response
- Response represents an HTTP response.
Namespace
Symfony\Component\HttpFoundationCode
public function setVary(string|array $headers, bool $replace = true) : static {
$this->headers
->set('Vary', $headers, $replace);
return $this;
}