This commit is contained in:
aynsix
2021-06-23 10:43:42 +03:00
parent 79d303ec86
commit bc56c97e33
3 changed files with 4 additions and 5 deletions

View File

@@ -35,13 +35,12 @@ class NetworkProxiesTestCommand extends Command
// test http-proxy
if ($proxyConfig->getHttpProxyConfiguration() != null) {
$httpProxy = $proxyConfig->getHttpProxyConfiguration();
array_merge($clientOptions, ['proxy' => $httpProxy]);
$clientOptions = array_merge($clientOptions, ['proxy' => $httpProxy]);
$client = new Client($clientOptions);
try {
$response = $client->get($urlTest);
$output->writeln("<info>Test outgoing connection with proxy " . $httpProxy ." success with status code : " . $response->getStatusCode() . " </info>");
} catch(\Exception $e) {
$output->writeln("<comment>Outgoing connection error with proxy " . $httpProxy . " , " . $e->getMessage() . "</comment>");

View File

@@ -44,7 +44,7 @@ class AssetsIngestWorker implements WorkerInterface
// add proxy in each request if defined in configuration
if ($proxyConfig->getHttpProxyConfiguration() != null) {
array_merge($clientOptions, ['proxy' => $proxyConfig->getHttpProxyConfiguration()]);
$clientOptions = array_merge($clientOptions, ['proxy' => $proxyConfig->getHttpProxyConfiguration()]);
}
$uploaderClient = new Client($clientOptions);

View File

@@ -64,7 +64,7 @@ class CreateRecordWorker implements WorkerInterface
// add proxy in each request if defined in configuration
if ($proxyConfig->getHttpProxyConfiguration() != null) {
array_merge($clientOptions, ['proxy' => $proxyConfig->getHttpProxyConfiguration()]);
$clientOptions = array_merge($clientOptions, ['proxy' => $proxyConfig->getHttpProxyConfiguration()]);
}
$uploaderClient = new Client($clientOptions);
@@ -96,7 +96,7 @@ class CreateRecordWorker implements WorkerInterface
$clientOptions = [];
// add proxy in each request if defined in configuration
if ($proxyConfig->getHttpProxyConfiguration() != null) {
array_merge($clientOptions, ['proxy' => $proxyConfig->getHttpProxyConfiguration()]);
$clientOptions = array_merge($clientOptions, ['proxy' => $proxyConfig->getHttpProxyConfiguration()]);
}
//download the asset