0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-21 11:06:09 +02:00

Enhancement: Allow hostnames in trusted proxies

This commit is contained in:
Ninos 2021-08-17 22:43:33 +02:00
parent 3a1f59b21c
commit ead647fd60
10 changed files with 10 additions and 10 deletions

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }

View file

@ -21,5 +21,5 @@ if ($overwriteCondAddr) {
$trustedProxies = getenv('TRUSTED_PROXIES'); $trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) { 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)))));
} }