Skip to content

trusted_proxies setting fails because of reverse-proxy.config.php #2209

Closed
@FelixBuehler

Description

@FelixBuehler

Hello together,

since the update to Nextcloud Hub 8/v29.0.0 my Security Warnings show me an incorrect trusted_proxy settings. I found out, that it has to do with the reverse-proxy.config.php file and in there the last part, where the entries from the normal config.php get exploded:

$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
  $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));

My normal config.php just looks like this:

  'trusted_proxies' => 
  array (
    0 => '192.168.1.11',
  ),

I don't understand PHP that good, but i think it has something to do with the functions not giving back a clean list. Since 29, there is an additional check, see here:
nextcloud/server@14addf3

Also this: https://help.nextcloud.com/t/after-upgrade-to-29-getting-trusted-proxies-error/189016

Can anyone help me, how to fix the reverse-proxy.config.php?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions