mirror of
https://github.com/php-win-ext/php-sdk-binary-tools.git
synced 2026-04-25 17:58:07 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 53afca7edb | |||
| 96d8b2f49a |
@@ -9,7 +9,7 @@ class Config
|
|||||||
/* Config variables. */
|
/* Config variables. */
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected static $depsHost = 'downloads.php.net';
|
protected static $depsHost = 'phpext.phptools.online';
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
protected static $depsPort = 443;
|
protected static $depsPort = 443;
|
||||||
@@ -18,7 +18,7 @@ class Config
|
|||||||
protected static $depsUriScheme = "https";
|
protected static $depsUriScheme = "https";
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected static $depsBaseUri = "/~windows/php-sdk/deps";
|
protected static $depsBaseUri = "/api/downloadable/download";
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected static $sdkNugetFeedUrl = "http://127.0.0.1/sdk/nuget"; // experimental?
|
protected static $sdkNugetFeedUrl = "http://127.0.0.1/sdk/nuget"; // experimental?
|
||||||
|
|||||||
@@ -138,6 +138,11 @@ retry:
|
|||||||
curl_setopt($ch, CURLOPT_USERAGENT, Config::getSdkUserAgentName());
|
curl_setopt($ch, CURLOPT_USERAGENT, Config::getSdkUserAgentName());
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||||
|
|
||||||
|
$token = getenv('API_TOKEN');
|
||||||
|
if (!empty($token)) {
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer '.$token]);
|
||||||
|
}
|
||||||
|
|
||||||
// workaround for <https://github.com/microsoft/php-sdk-binary-tools/issues/69>
|
// workaround for <https://github.com/microsoft/php-sdk-binary-tools/issues/69>
|
||||||
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user