Reverse proxy configuration not working as expected (IP throttling)

Hi there, I have my instance set up in a special way:

LANTraefik 2 in DockerNextcloud 29 fpm-alpine with Docker Compose

I have set environment variables which result in this section of the config.php file:

  'trusted_proxies' => 
  array (
    0 => '172.34.0.0/16',
  ),
  'forwarded_for_headers' => 
  array (
    0 => 'HTTP_X_FORWARDED_FOR',
  ),

However, I still receive this warning in the security tab regularly:

Your remote address was identified as “172.34.0.3” and is throttled at the moment by 400ms.

Is there anything else that I need to configure, in order for Nextcloud to see the real IP address of my clients and not the proxy IP in Docker?

Thank you!

Have you checked whether Traefik sends a HTTP_X_FORWARDED_FOR header?

Thank you for your reply. Based on your comment, I did some research and found this thread: Use X-Forwarded in Traefik v2 - #5 by norweeg - Traefik v2 - Traefik Labs Community Forum

After some testing, it seems that even if I set the values for Traefik mentioned in the thread (adapted to 172.34.0.0/16 in my case), it does not set this header. In fact, even if I set --entrypoints.lansecure.forwardedHeaders.insecure=true, Nextcloud still just sees the IP of Traefik.

I guess I will have to double check my Traefik setup or maybe my router. Thanks for pointing me in that direction.

Were you able to solve this problem? I have the exact same problem as you, with the only difference, that I use traefik 3.