We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 138100d + cd78254 commit 124195eCopy full SHA for 124195e
config/config.php
@@ -11,5 +11,6 @@
11
'username' => env('ELASTICSEARCH_USERNAME', ''),
12
'password' => env('ELASTICSEARCH_PASSWORD', ''),
13
'ssl_verification' => env('ELASTICSEARCH_SSL_VERIFICATION', false),
14
+ 'handler' => null, // for call_user_func_array
15
],
16
];
src/ElasticClient.php
@@ -157,6 +157,10 @@ public static function fromConfig(array $config): static
157
$builder->setBasicAuthentication($username, $password);
158
}
159
160
+ if (filled($config['handler'] ?? null)) {
161
+ $builder->setHandler(call_user_func_array($config['handler'], []));
162
+ }
163
+
164
return new static($builder->build());
165
166
0 commit comments