0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-03-16 11:25:09 +01:00

Add default values for reverse proxy config from environment

Signed-off-by: András Maróy <andras@maroy.hu>
This commit is contained in:
András Maróy 2020-04-05 15:16:49 +02:00
parent a41ef6143d
commit 2b2bd3c6aa
10 changed files with 100 additions and 0 deletions

View file

@ -1,20 +1,30 @@
<?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'] = [];
}

View file

@ -1,20 +1,30 @@
<?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'] = [];
}

View file

@ -1,20 +1,30 @@
<?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'] = [];
}

View file

@ -1,20 +1,30 @@
<?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'] = [];
}

View file

@ -1,20 +1,30 @@
<?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'] = [];
}

View file

@ -1,20 +1,30 @@
<?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'] = [];
}

View file

@ -1,20 +1,30 @@
<?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'] = [];
}

View file

@ -1,20 +1,30 @@
<?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'] = [];
}

View file

@ -1,20 +1,30 @@
<?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'] = [];
}

View file

@ -1,20 +1,30 @@
<?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'] = [];
}