public function redirectToReferrer(string $defaultRoute = null): RedirectResponse
    {
        $request = $this->get('request_stack')->getCurrentRequest();

        return $this->redirectToFirstValidRoute([
            $request->headers->get('referer'),
            $defaultRoute,
        ]);
    }