public function isCors()
    {
        if (!$this->hasHeader('Origin')) {
            return false;
        }
        $origin = parse_url($this->getHeaderLine('Origin'));
        $host   = $this->getUri()->getHost();
        $scheme = $this->getUri()->getScheme();
        return (
            !$host ||
            strtolower($origin['scheme']?? '') !== strtolower($scheme) ||
            strpos(strtolower($origin['host'] ?? ''), strtolower($host)) === false
        );
    }