Reverse Proxy works on PC but not Mobile

Hi Guys

I’m hoping someone can help, i have tried searching before asking.

I’m running Nginx Proxy Manager for reverse proxy (I have web sockets enabled).
I can access my HA from my pc through my reverse proxy no problem, when I try to log in with my mobile devices (Browser or HA app) it gives an error (logs show no errors at all) if I refresh the page HA registers as a failed login attempt in the error logs.

This is my http config:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.1.70
    - 192.168.1.0/24
  cors_allowed_origins:
   - reverse proxy address

Are you using Nginx add-on for reverse proxy? If yes, then you will need to add the proxy IP address in the HTTP configuration (it is a breaking changes introduced in 2021.7)-

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.1.70
    - 192.168.1.0/24
    - 172.30.33.0/24 # Add the IP address of the proxy server
  cors_allowed_origins:
   - reverse proxy address

See here for more information regarding reverse proxy-

Thanks @ardysusilo, I am using nginx but in a seperate docker container.

I have tried adding the host ip for the docker container: 172.17.0.5, 172.17.0.0/16, 172.17.0.0/24

Nothing seems to work.
It does work on my PC just not my mobile devices

192.168.1.70 is my network IP for docker container on unraid.

Okay, then this maybe worth skimming-

1 Like

Sorry for bumping an old thread. I encountered this same issue. Somehow the reverse proxy works on my PC and Mac, but failed to load on my phone.

Did you manage to fix your issue?

hi @ravenspeak

I did get it working but i can’t remember what i did been a while since this post hahaha.

I do have this in my config:

http:
  server_port: 8123
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.1.72
    - 192.168.1.0/24

I hope this helps?

Bumping this topic again. I still can’t for the life of me work out why NGINX and duckdns can be working perfectly fine from a PC instance, but when I use 4G and try to access the exact same URL, I get no response.
Is there are trusted proxy I need to add? What could I try. What is different about a phone/4G connection that would mean a refused connected here?

Interestingly, if I connect to a VPN and try to connect to the duckdns URL, I get denied as well with “Unable to fetch auth providers. https://[myduckdnsname].duckdns.org/?auth_callback=1”.
Why would I only be able to access the duckdns domain successfully from within my home network? So confused…

Sounds like the problem in some cases might be with how the proxy handles mobile traffic. One thing you could try is ensuring that your proxy configuration includes all potential IP ranges your mobile devices might use.

In my experience, adding the IP addresses for your proxy and mobile networks can sometimes help. You might also want to check out this proxy server guide for more detailed information on setting up and troubleshooting proxies. It covers a lot of useful tips that could help resolve your issue.