Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbfe86fd

Browse files
authored
Merge pull request#18 from AlexNodex/patch-2
sourceIP support
2 parentsb31ad9a +660bf6b commitbfe86fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/Client.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class Client
119119
* @type Filesystem $fs Filesystem for storage of static data
120120
* @type string $basePath The base path for the filesystem (used to store account information and csr / keys
121121
* @type string $username The acme username
122+
* @type string $source_ip The source IP for Guzzle (via curl.options) to bind to (defaults to 0.0.0.0 [OS default])
122123
* }
123124
*/
124125
publicfunction__construct($config = [])
@@ -368,9 +369,12 @@ protected function getHttpClient()
368369
{
369370
if ($this->httpClient ===null) {
370371
$this->httpClient =newHttpClient([
371-
'base_uri' => (
372+
'base_uri'=> (
372373
($this->getOption('mode',self::MODE_LIVE) ==self::MODE_LIVE) ?
373374
self::DIRECTORY_LIVE :self::DIRECTORY_STAGING),
375+
'curl.options' => [
376+
'CURLOPT_INTERFACE' =>$this->getOption('source_ip','0.0.0.0')
377+
]
374378
]);
375379
}
376380
return$this->httpClient;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp