SecuredRedirectResponse

Provides a common base class for safe redirects.

In case you want to redirect to external URLs use TrustedRedirectResponse.

For local URLs we use LocalRedirectResponse which opts out of external redirects.

Hierarchy

  • class \Symfony\Component\HttpFoundation\RedirectResponse extends \Symfony\Component\HttpFoundation\Response

File

core/lib/Drupal/Component/HttpFoundation/SecuredRedirectResponse.php, line 16

Namespace

Drupal\Component\HttpFoundation

Members

Name Modifiers Type Description
RedirectResponse::$targetUrl protected property
RedirectResponse::create public static function
RedirectResponse::getTargetUrl public function Returns the target URL.
RedirectResponse::__construct public function Creates a redirect response so that it conforms to the rules defined for a redirect status code.
SecuredRedirectResponse::createFromRedirectResponse public static function Copies an existing redirect response into a safe one.
SecuredRedirectResponse::fromResponse protected function Copies over the values from the given response.
SecuredRedirectResponse::isSafe abstract protected function Returns whether the URL is considered as safe to redirect to.
SecuredRedirectResponse::setTargetUrl public function Sets the redirect target of this response. Overrides RedirectResponse::setTargetUrl
doc_Drupal
2016-10-29 09:40:58
Comments
Leave a Comment

Please login to continue.