mirror of
https://github.com/nextcloud/docker.git
synced 2025-01-20 04:43:53 +01:00
6d2390726f
* Expose reverse proxy related configuration as environment variables Signed-off-by: András Maróy <andras@maroy.hu> * Update README.md Co-Authored-By: J0WI <J0WI@users.noreply.github.com> Signed-off-by: András Maróy <andras@maroy.hu> * Update README.md Co-Authored-By: J0WI <J0WI@users.noreply.github.com> Signed-off-by: András Maróy <andras@maroy.hu> * Add default values for reverse proxy config from environment Signed-off-by: András Maróy <andras@maroy.hu> * Change reverse proxy default values to null Signed-off-by: András Maróy <andras@maroy.hu> * Store environment variables in vars in reverse-proxy config Signed-off-by: András Maróy <andras@maroy.hu> * Merge reverse proxy configs Signed-off-by: András Maróy <andras@maroy.hu> * Move overwrite parameters to reverse proxy section in the readme Signed-off-by: András Maróy <andras@maroy.hu> * Add reverse proxy config to 19.0-beta images Signed-off-by: András Maróy <andras@maroy.hu> * Remove default null from reverse proxy config to avoid breaking existing deployments Signed-off-by: András Maróy <andras@maroy.hu> Co-authored-by: J0WI <J0WI@users.noreply.github.com>
25 lines
674 B
PHP
25 lines
674 B
PHP
<?php
|
|
$overwriteHost = getenv('OVERWRITEHOST');
|
|
if ($overwriteHost) {
|
|
$CONFIG['overwritehost'] = $overwriteHost;
|
|
}
|
|
|
|
$overwriteProtocol = getenv('OVERWRITEPROTOCOL');
|
|
if ($overwriteProtocol) {
|
|
$CONFIG['overwriteprotocol'] = $overwriteProtocol;
|
|
}
|
|
|
|
$overwriteWebRoot = getenv('OVERWRITEWEBROOT');
|
|
if ($overwriteWebRoot) {
|
|
$CONFIG['overwritewebroot'] = $overwriteWebRoot;
|
|
}
|
|
|
|
$overwriteCondAddr = getenv('OVERWRITECONDADDR');
|
|
if ($overwriteCondAddr) {
|
|
$CONFIG['overwritecondaddr'] = $overwriteCondAddr;
|
|
}
|
|
|
|
$trustedProxies = getenv('TRUSTED_PROXIES');
|
|
if ($trustedProxies) {
|
|
$CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
|
|
}
|