mirror of https://github.com/MISP/MISP
fix: [proxy] Skip_proxy was broken up until now, fixes #5324
- was simply ignored, added the hook for it for the sync toolpull/5390/head
parent
5f25f451df
commit
10bc49ae13
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue