fix: [proxy] Skip_proxy was broken up until now, fixes #5324

- was simply ignored, added the hook for it for the sync tool
pull/5390/head
iglocska 2019-11-08 10:06:44 +01:00
parent 5f25f451df
commit 10bc49ae13
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,9 @@ class SyncTool
$params['ssl_verify_peer'] = false;
}
}
if (!empty($server['Server']['skip_proxy'])) {
$params['skip_proxy'] = 1;
}
}
return $this->createHttpSocket($params);
@ -49,7 +52,7 @@ class SyncTool
App::uses('HttpSocket', 'Network/Http');
$HttpSocket = new HttpSocket($params);
$proxy = Configure::read('Proxy');
if (isset($proxy['host']) && !empty($proxy['host'])) {
if (empty($params['skip_proxy']) && isset($proxy['host']) && !empty($proxy['host'])) {
$HttpSocket->configProxy($proxy['host'], $proxy['port'], $proxy['method'], $proxy['user'], $proxy['password']);
}
return $HttpSocket;