Merge pull request #5093 from nextcloud/enh/noid/configure-proxy

nextcloud: allow to configure proxy options via env
This commit is contained in:
Simon L. 2024-08-08 20:40:56 +02:00 committed by GitHub
commit 35c641265c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,13 @@
<?php
if (getenv('HTTP_PROXY') !== false) {
$CONFIG['proxy'] = getenv('HTTP_PROXY');
}
if (getenv('HTTPS_PROXY') !== false) {
$CONFIG['proxy'] = getenv('HTTPS_PROXY');
}
if (getenv('PROXY_USER_PASSWORD') !== false) {
$CONFIG['proxyuserpwd'] = getenv('PROXY_USER_PASSWORD');
}
if (getenv('NO_PROXY') !== false) {
$CONFIG['proxyexclude'] = explode(',', getenv('NO_PROXY'));
}