diff --git a/.config/reverse-proxy.config.php b/.config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/.config/reverse-proxy.config.php +++ b/.config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); } diff --git a/20/apache/config/reverse-proxy.config.php b/20/apache/config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/20/apache/config/reverse-proxy.config.php +++ b/20/apache/config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); } diff --git a/20/fpm-alpine/config/reverse-proxy.config.php b/20/fpm-alpine/config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/20/fpm-alpine/config/reverse-proxy.config.php +++ b/20/fpm-alpine/config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); } diff --git a/20/fpm/config/reverse-proxy.config.php b/20/fpm/config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/20/fpm/config/reverse-proxy.config.php +++ b/20/fpm/config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); } diff --git a/21/apache/config/reverse-proxy.config.php b/21/apache/config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/21/apache/config/reverse-proxy.config.php +++ b/21/apache/config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); } diff --git a/21/fpm-alpine/config/reverse-proxy.config.php b/21/fpm-alpine/config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/21/fpm-alpine/config/reverse-proxy.config.php +++ b/21/fpm-alpine/config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); } diff --git a/21/fpm/config/reverse-proxy.config.php b/21/fpm/config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/21/fpm/config/reverse-proxy.config.php +++ b/21/fpm/config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); } diff --git a/22/apache/config/reverse-proxy.config.php b/22/apache/config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/22/apache/config/reverse-proxy.config.php +++ b/22/apache/config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); } diff --git a/22/fpm-alpine/config/reverse-proxy.config.php b/22/fpm-alpine/config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/22/fpm-alpine/config/reverse-proxy.config.php +++ b/22/fpm-alpine/config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); } diff --git a/22/fpm/config/reverse-proxy.config.php b/22/fpm/config/reverse-proxy.config.php index 667be312..ef00e07f 100644 --- a/22/fpm/config/reverse-proxy.config.php +++ b/22/fpm/config/reverse-proxy.config.php @@ -21,5 +21,5 @@ if ($overwriteCondAddr) { $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { - $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); + $CONFIG['trusted_proxies'] = array_values(array_unique(array_map('gethostbyname', array_filter(explode(' ', $trustedProxies))))); }