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\Psr7Code
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;
}