Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chelsiejohnston/e47701d09c6cfe60ea81 to your computer and use it in GitHub Desktop.
Save chelsiejohnston/e47701d09c6cfe60ea81 to your computer and use it in GitHub Desktop.
core/lib/Drupal/Core/Routing/LocalAwareRedirectResponseTrait.php
/**
* {@inheritdoc}
*/
protected function isLocal($url) {
print $url;
var_dump(UrlHelper::externalIsLocal($url, $this->getRequestContext()->getCompleteBaseUrl()));
var_dump($this->getRequestContext()->getCompleteBaseUrl());
return !UrlHelper::isExternal($url) || UrlHelper::externalIsLocal($url, $this->getRequestContext()->getCompleteBaseUrl());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment