0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-03-17 20:05:09 +01:00
nextcloud-docker/.config/reverse-proxy.config.php
András Maróy 2b2bd3c6aa Add default values for reverse proxy config from environment
Signed-off-by: András Maróy <andras@maroy.hu>
2020-04-05 15:18:39 +02:00

30 lines
721 B
PHP

<?php
if (getenv('OVERWRITEHOST')) {
$CONFIG['overwritehost'] = getenv('OVERWRITEHOST');
} else {
$CONFIG['overwritehost'] = '';
}
if (getenv('OVERWRITEPROTOCOL')) {
$CONFIG['overwriteprotocol'] = getenv('OVERWRITEPROTOCOL');
} else {
$CONFIG['overwriteprotocol'] = '';
}
if (getenv('OVERWRITEWEBROOT')) {
$CONFIG['overwritewebroot'] = getenv('OVERWRITEWEBROOT');
} else {
$CONFIG['overwritewebroot'] = '';
}
if (getenv('OVERWRITECONDADDR')) {
$CONFIG['overwritecondaddr'] = getenv('OVERWRITECONDADDR');
} else {
$CONFIG['overwritecondaddr'] = '';
}
if (getenv('TRUSTED_PROXIES')) {
$CONFIG['trusted_proxies'] = explode(',', getenv('TRUSTED_PROXIES'));
} else {
$CONFIG['trusted_proxies'] = [];
}