Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UriComparator.php

function UriComparator::isCrossOrigin

Determines if a modified URL should be considered cross-origin with respect to an original URL.

File

vendor/guzzlehttp/psr7/src/UriComparator.php, line 20

Class

UriComparator
Provides methods to determine if a modified URL should be considered cross-origin.

Namespace

GuzzleHttp\Psr7

Code

public static function isCrossOrigin(UriInterface $original, UriInterface $modified) : bool {
    if (\strcasecmp($original->getHost(), $modified->getHost()) !== 0) {
        return true;
    }
    if ($original->getScheme() !== $modified->getScheme()) {
        return true;
    }
    if (self::computePort($original) !== self::computePort($modified)) {
        return true;
    }
    return false;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal