Proxy support

This commit is contained in:
Pablo Ferreiro 2022-09-03 13:21:43 +02:00
parent af4d98b8dd
commit 96fb2fd428
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
4 changed files with 28 additions and 8 deletions

View file

@ -71,6 +71,20 @@ class Wrappers {
'close_when_done' => false
]
];
// -- PROXY CONFIG -- //
$proxy_host = Misc::env('PROXY_HOST', '');
$proxy_port = Misc::env('PROXY_PORT', '');
if ($proxy_host && $proxy_port) {
$options['proxy'] = [
'host' => $proxy_host,
'port' => $proxy_port,
'username' => Misc::env('PROXY_USERNAME', null),
'password' => Misc::env('PROXY_PASSWORD', null)
];
}
// Cache config
$cacheEngine = null;
if (isset($_ENV['API_CACHE'])) {