mirror of
https://github.com/anikeen-com/yaac.git
synced 2026-03-20 09:06:08 +00:00
Update Client.php
Added source_ip as a config option
This commit is contained in:
@@ -119,6 +119,7 @@ class Client
|
|||||||
* @type Filesystem $fs Filesystem for storage of static data
|
* @type Filesystem $fs Filesystem for storage of static data
|
||||||
* @type string $basePath The base path for the filesystem (used to store account information and csr / keys
|
* @type string $basePath The base path for the filesystem (used to store account information and csr / keys
|
||||||
* @type string $username The acme username
|
* @type string $username The acme username
|
||||||
|
* @type string $source_ip The source IP for Guzzle (via curl.options) to bind to (defaults to 0.0.0.0 [OS default])
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
public function __construct($config = [])
|
public function __construct($config = [])
|
||||||
@@ -371,6 +372,9 @@ class Client
|
|||||||
'base_uri' => (
|
'base_uri' => (
|
||||||
($this->getOption('mode', self::MODE_LIVE) == self::MODE_LIVE) ?
|
($this->getOption('mode', self::MODE_LIVE) == self::MODE_LIVE) ?
|
||||||
self::DIRECTORY_LIVE : self::DIRECTORY_STAGING),
|
self::DIRECTORY_LIVE : self::DIRECTORY_STAGING),
|
||||||
|
'curl.options'=>[
|
||||||
|
'CURLOPT_INTERFACE'=>($this->getOption('source_ip',false) !== false) ? $this->config['source_ip'] : '0.0.0.0'
|
||||||
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
return $this->httpClient;
|
return $this->httpClient;
|
||||||
|
|||||||
Reference in New Issue
Block a user