You are here

private function ZeroConfigPurger::baseUri in Varnish purger 8.2

Create a URI with the configured proxy port.

Parameters

string $ip_address:

Return value

\GuzzleHttp\Psr7\Uri

1 call to ZeroConfigPurger::baseUri()
ZeroConfigPurger::invalidateEverything in src/Plugin/Purge/Purger/ZeroConfigPurger.php
Invalidate the entire website.

File

src/Plugin/Purge/Purger/ZeroConfigPurger.php, line 528

Class

ZeroConfigPurger
A purger with minimal configuration required.

Namespace

Drupal\varnish_purger\Plugin\Purge\Purger

Code

private function baseUri(string $ip_address) {
  $uri = new Uri('http://' . $ip_address);
  if ($this->proxyPort) {
    $uri = $uri
      ->withPort($this->proxyPort);
  }
  return $uri;
}