diff options
author | András Maróy <andras@maroy.hu> | 2020-04-16 17:54:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 15:54:48 +0000 |
commit | 6d2390726fe7110b406c447d48aa345fc9d07122 (patch) | |
tree | 9c2c9976d731baafc64bc16dfdd376b9c515026b /19.0-beta | |
parent | 815298f5deea7796cf7968b61647606cdd8c8178 (diff) |
Expose reverse proxy related configuration as environment variables (#1048)18.0.3-fpm-alpine18.0.3-fpm18.0.3-apache18.0.317.0.5-fpm-alpine17.0.5-fpm17.0.5-apache17.0.516.0.9-fpm-alpine16.0.9-fpm16.0.9-apache16.0.9
* 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>
Diffstat (limited to '19.0-beta')
-rw-r--r-- | 19.0-beta/apache/config/reverse-proxy.config.php | 25 | ||||
-rw-r--r-- | 19.0-beta/apache/config/reverse_proxy.config.php | 11 | ||||
-rw-r--r-- | 19.0-beta/fpm-alpine/config/reverse-proxy.config.php | 25 | ||||
-rw-r--r-- | 19.0-beta/fpm-alpine/config/reverse_proxy.config.php | 11 | ||||
-rw-r--r-- | 19.0-beta/fpm/config/reverse-proxy.config.php | 25 | ||||
-rw-r--r-- | 19.0-beta/fpm/config/reverse_proxy.config.php | 11 |
6 files changed, 75 insertions, 33 deletions
diff --git a/19.0-beta/apache/config/reverse-proxy.config.php b/19.0-beta/apache/config/reverse-proxy.config.php new file mode 100644 index 00000000..667be312 --- /dev/null +++ b/19.0-beta/apache/config/reverse-proxy.config.php @@ -0,0 +1,25 @@ +<?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))); +} diff --git a/19.0-beta/apache/config/reverse_proxy.config.php b/19.0-beta/apache/config/reverse_proxy.config.php deleted file mode 100644 index 26a8bff3..00000000 --- a/19.0-beta/apache/config/reverse_proxy.config.php +++ /dev/null @@ -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;
\ No newline at end of file diff --git a/19.0-beta/fpm-alpine/config/reverse-proxy.config.php b/19.0-beta/fpm-alpine/config/reverse-proxy.config.php new file mode 100644 index 00000000..667be312 --- /dev/null +++ b/19.0-beta/fpm-alpine/config/reverse-proxy.config.php @@ -0,0 +1,25 @@ +<?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))); +} diff --git a/19.0-beta/fpm-alpine/config/reverse_proxy.config.php b/19.0-beta/fpm-alpine/config/reverse_proxy.config.php deleted file mode 100644 index 26a8bff3..00000000 --- a/19.0-beta/fpm-alpine/config/reverse_proxy.config.php +++ /dev/null @@ -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;
\ No newline at end of file diff --git a/19.0-beta/fpm/config/reverse-proxy.config.php b/19.0-beta/fpm/config/reverse-proxy.config.php new file mode 100644 index 00000000..667be312 --- /dev/null +++ b/19.0-beta/fpm/config/reverse-proxy.config.php @@ -0,0 +1,25 @@ +<?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))); +} diff --git a/19.0-beta/fpm/config/reverse_proxy.config.php b/19.0-beta/fpm/config/reverse_proxy.config.php deleted file mode 100644 index 26a8bff3..00000000 --- a/19.0-beta/fpm/config/reverse_proxy.config.php +++ /dev/null @@ -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;
\ No newline at end of file |