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\domainCode
protected function isLocal($url) {
$base_url = $this
->getRequestContext()
->getCompleteBaseUrl();
return !UrlHelper::isExternal($url) || UrlHelper::externalIsLocal($url, $base_url) || $this
->externalIsRegistered($url, $base_url);
}