Helthe\Component\Turbolinks\Turbolinks::canHandleRedirect PHP Method

canHandleRedirect() private method

Checks if the request can handle a Turbolink redirect. You need to have a session and a XHR request header to handle a redirect.
private canHandleRedirect ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
return boolean
    private function canHandleRedirect(Request $request)
    {
        $session = $request->getSession();
        return $session instanceof SessionInterface && $request->headers->has(self::ORIGIN_REQUEST_HEADER);
    }