Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Response.php

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\HttpFoundation

Code

public function setVary(string|array $headers, bool $replace = true) : static {
    $this->headers
        ->set('Vary', $headers, $replace);
    return $this;
}
RSS feed
Powered by Drupal