You are here

protected function DomainRedirectResponse::isLocal in Domain Access 8

1 call to DomainRedirectResponse::isLocal()
DomainRedirectResponse::isSafe in domain/src/DomainRedirectResponse.php
Returns whether the URL is considered as safe to redirect to.

File

domain/src/DomainRedirectResponse.php, line 46

Class

DomainRedirectResponse
A redirect response which understands domain URLs are local to the install.

Namespace

Drupal\domain

Code

protected function isLocal($url) {
  $base_url = $this
    ->getRequestContext()
    ->getCompleteBaseUrl();
  return !UrlHelper::isExternal($url) || UrlHelper::externalIsLocal($url, $base_url) || $this
    ->externalIsRegistered($url, $base_url);
}