0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-03-15 10:55:09 +01:00

Merge reverse proxy configs

Signed-off-by: András Maróy <andras@maroy.hu>
This commit is contained in:
András Maróy 2020-04-08 21:24:51 +02:00
parent 35225b51f1
commit 8911a4ba50
20 changed files with 150 additions and 260 deletions

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;

View file

@ -1,35 +1,35 @@
<?php <?php
$overwritehost = getenv('OVERWRITEHOST'); $overwriteHost = getenv('OVERWRITEHOST');
if ($overwritehost) { if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwritehost; $CONFIG['overwritehost'] = $overwriteHost;
} else { } else {
$CONFIG['overwritehost'] = null; $CONFIG['overwritehost'] = null;
} }
$overwriteprotocol = getenv('OVERWRITEPROTOCOL'); $overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteprotocol) { if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteprotocol; $CONFIG['overwriteprotocol'] = $overwriteProtocol;
} else { } else {
$CONFIG['overwriteprotocol'] = null; $CONFIG['overwriteprotocol'] = null;
} }
$overwritewebroot = getenv('OVERWRITEWEBROOT'); $overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwritewebroot) { if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwritewebroot; $CONFIG['overwritewebroot'] = $overwriteWebRoot;
} else { } else {
$CONFIG['overwritewebroot'] = null; $CONFIG['overwritewebroot'] = null;
} }
$overwritecondaddr = getenv('OVERWRITECONDADDR'); $overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwritecondaddr) { if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwritecondaddr; $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
} else { } else {
$CONFIG['overwritecondaddr'] = null; $CONFIG['overwritecondaddr'] = null;
} }
$trusted_proxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trusted_proxies) { if ($trustedProxies) {
$CONFIG['trusted_proxies'] = explode(',', $trusted_proxies); $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else { } else {
$CONFIG['trusted_proxies'] = null; $CONFIG['trusted_proxies'] = null;
} }

View file

@ -1,11 +0,0 @@
<?php
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
} else {
$trustedProxies = null;
}
$CONFIG['trusted_proxies'] = $trustedProxies;