protected function redirect(string $uri, bool $isPermanent = false): void
    {
        $nCode = $isPermanent ? 301 : 302;
        Headers::getInstance()
            ->addByHttpCode($nCode)
            ->add('Location: '.$uri)
            ->run();
        exit;
    }