protected function getScheme(?bool $secure): string
    {
        if (\is_null($secure)) {
            return $this->forceSchema ?: $this->request->getScheme().'://';
        }

        return $secure ? 'https://' : 'http://';
    }