protected function isSecure($preset = true)
    {
        if (null !== $preset) {
            return (bool) $preset;
        }

        if (null === $this->router) {
            return false;
        }

        return 'https' == strtolower($this->router->getContext()->getScheme());
    }