protected function TrustedRedirectResponse::isSafe in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Routing/TrustedRedirectResponse.php \Drupal\Core\Routing\TrustedRedirectResponse::isSafe()
Returns whether the URL is considered as safe to redirect to.
Parameters
string $url: The URL checked for safety.
Return value
bool
Overrides SecuredRedirectResponse::isSafe
File
- core/
lib/ Drupal/ Core/ Routing/ TrustedRedirectResponse.php, line 45
Class
- TrustedRedirectResponse
- Provides a redirect response which contains trusted URLs.
Namespace
Drupal\Core\RoutingCode
protected function isSafe($url) {
return !empty($this->trustedUrls[$url]) || $this
->isLocal($url);
}