From 6e54048644d7572f5fe9366329f18edc4d3de643 Mon Sep 17 00:00:00 2001 From: Klaus Frank Date: Thu, 25 Nov 2021 14:03:48 +0100 Subject: [PATCH] Add OVERWRITECLIURL env var (#1622) Signed-off-by: Klaus Frank --- .config/reverse-proxy.config.php | 5 +++++ 20/apache/config/reverse-proxy.config.php | 5 +++++ 20/fpm-alpine/config/reverse-proxy.config.php | 5 +++++ 20/fpm/config/reverse-proxy.config.php | 5 +++++ 21/apache/config/reverse-proxy.config.php | 5 +++++ 21/fpm-alpine/config/reverse-proxy.config.php | 5 +++++ 21/fpm/config/reverse-proxy.config.php | 5 +++++ 22/apache/config/reverse-proxy.config.php | 5 +++++ 22/fpm-alpine/config/reverse-proxy.config.php | 5 +++++ 22/fpm/config/reverse-proxy.config.php | 5 +++++ README.md | 1 + 11 files changed, 51 insertions(+) diff --git a/.config/reverse-proxy.config.php b/.config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/.config/reverse-proxy.config.php +++ b/.config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/20/apache/config/reverse-proxy.config.php b/20/apache/config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/20/apache/config/reverse-proxy.config.php +++ b/20/apache/config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/20/fpm-alpine/config/reverse-proxy.config.php b/20/fpm-alpine/config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/20/fpm-alpine/config/reverse-proxy.config.php +++ b/20/fpm-alpine/config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/20/fpm/config/reverse-proxy.config.php b/20/fpm/config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/20/fpm/config/reverse-proxy.config.php +++ b/20/fpm/config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/21/apache/config/reverse-proxy.config.php b/21/apache/config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/21/apache/config/reverse-proxy.config.php +++ b/21/apache/config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/21/fpm-alpine/config/reverse-proxy.config.php b/21/fpm-alpine/config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/21/fpm-alpine/config/reverse-proxy.config.php +++ b/21/fpm-alpine/config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/21/fpm/config/reverse-proxy.config.php b/21/fpm/config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/21/fpm/config/reverse-proxy.config.php +++ b/21/fpm/config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/22/apache/config/reverse-proxy.config.php b/22/apache/config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/22/apache/config/reverse-proxy.config.php +++ b/22/apache/config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/22/fpm-alpine/config/reverse-proxy.config.php b/22/fpm-alpine/config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/22/fpm-alpine/config/reverse-proxy.config.php +++ b/22/fpm-alpine/config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/22/fpm/config/reverse-proxy.config.php b/22/fpm/config/reverse-proxy.config.php index 667be312..7df0415e 100644 --- a/22/fpm/config/reverse-proxy.config.php +++ b/22/fpm/config/reverse-proxy.config.php @@ -9,6 +9,11 @@ if ($overwriteProtocol) { $CONFIG['overwriteprotocol'] = $overwriteProtocol; } +$overwriteCliUrl = getenv('OVERWRITECLIURL'); +if ($overwriteCliUrl) { + $CONFIG['overwrite.cli.url'] = $overwriteCliUrl; +} + $overwriteWebRoot = getenv('OVERWRITEWEBROOT'); if ($overwriteWebRoot) { $CONFIG['overwritewebroot'] = $overwriteWebRoot; diff --git a/README.md b/README.md index f0501730..1ebc5221 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,7 @@ If the `TRUSTED_PROXIES` approach does not work for you, try using fixed values - `OVERWRITEHOST` (empty by default): Set the hostname of the proxy. Can also specify a port. - `OVERWRITEPROTOCOL` (empty by default): Set the protocol of the proxy, http or https. +- `OVERWRITECLIURL` (empty by default): Set the cli url of the proxy (e.g. https://mydnsname.example.com) - `OVERWRITEWEBROOT` (empty by default): Set the absolute path of the proxy. - `OVERWRITECONDADDR` (empty by default): Regex to overwrite the values dependent on the remote address.