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
        );
    }
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
        );
    }
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 ) ; }
Determine if this is an CORS request
@return boolean is the request CORS
Determine if this is an CORS request