src/Control/RequestHandler.php
public function getReturnReferer()
    {
        $referer = $this->getReferer();
        if ($referer && Director::is_site_url($referer)) {
            return $referer;
        }
        return null;
    }
public function getReturnReferer()
    {
        $referer = $this->getReferer();
        if ($referer && Director::is_site_url($referer)) {
            return $referer;
        }
        return null;
    }
public function getReturnReferer ( ) { $ referer = $ this -> getReferer ( ) ; if ( $ referer && Director :: is_site_url ( $ referer ) ) { return $ referer ; } return null ; }
Returns the referer, if it is safely validated as an internal URL
and can be redirected to.

@internal called from {@see Form::getValidationErrorResponse}
@return string|null
Returns the referer if it is safely validated as an internal URL and can be redirected to .