Reverse Proxy Configuration is incorrect

Hello everyone.

I get this error message in my setup, and i don’t know why.

The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation :arrow_upper_right:.

My setup is as following:

INTERNET <=(https)=> PROXY <=(https)=> NC Host

the proxy has the internal IP 10.23.23.7 and sets the following headers:

X-Forwarded-Port: # the original port (443)
X-Forwarded-Host: # The original host header
X-Forwarded-Proto: # the protocoll the client used (https)
X-Real-Ip: # The real client ip
X-Forwarded-For:  # The real client ip

i wrote a small script to see if the header are set correctly and they work as expected.

on the nextcloud machine i have the follwing settings in the config.php

  'trusted_proxys' => ['10.23.23.7'],
  'forwarded_for_headers' => ['HTTP_X_FORWARDED_FOR'],

But i still get the message that the proxy configuration is wrong.

is there another way how to fix this?