diff --git a/src/Composer/Util/Url.php b/src/Composer/Util/Url.php index 040d17db0..32f61347b 100644 --- a/src/Composer/Util/Url.php +++ b/src/Composer/Util/Url.php @@ -75,7 +75,7 @@ class Url $origin .= ':'.$port; } - if (strpos($origin, '.github.com') === (strlen($origin) - 11)) { + if (str_ends_with($origin, '.github.com') && $origin !== 'codeload.github.com') { return 'github.com'; }