Nginx Reverse Proxy 304 Error on service_worker.js

Hi, I just changed internet services to AT&T Fiber, and have had to switch over to using their gateway. Previously I was using an Asus gateway and everything was dandy. I’m forwarding ports 80, 443 and 8123 to my HA server in my internal network under the Firewall settings in the AT&T gateway. I have a proxy host setup in nginx via its proxy manager plugin that forwards home.mydomain.com to 8123 pointed at my HA server (192.168.86.250). Web sockets are enabled in the proxy host.

I’m pretty stuck and would appreciate if anybody has any insights that may help me get this up and running again.

configuration.yaml

# configure ssl and nginix proxy
http:
#  ssl_certificate: /ssl/fullchain.pem
#  ssl_key: /ssl/privkey.pem
  use_x_forwarded_for: true 
  trusted_proxies: 
    - 172.30.33.0/24 #(this was here before, but never knew for what)
    - 192.168.86.254 #(this is the internal ip of my AT&T gateway)

When I try to access, I get a login screen and after logging in it just spins and then says “Unable to connect”

In my nginx logs, I get the following:

[05/Feb/2024:16:50:52 -0600] - 200 200 - GET https home.mydomain.com "/manifest.json" [Client 192.168.86.254] [Length 1663] [Gzip -] [Sent-to 192.168.86.250] "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "https://home.mydomain.com/lovelace"
[05/Feb/2024:16:50:54 -0600] - 304 304 - GET https home.mydomain.com "/service_worker.js" [Client 192.168.86.254] [Length 0] [Gzip -] [Sent-to 192.168.86.250] "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "https://home.mydomain.com/service_worker.js"

- 172.30.33.0/24 #(this was here before, but never knew for what)
That seems wrong because trusted_proxies is the IPs of each proxy in front of HA. In almost all cases that should be a single IP. But you have whitelisted all IPs on a subnet.

- 192.168.86.254 #(this is the internal ip of my AT&T gateway)
That should be the Nginx IP.

Is it possible for you to ditch ATT’s modem and get your own? ISP’s have full administrative remote control over their modems.

Sadly I cannot. I was using my own router behind their gateway, but they don’t have a bridge mode like Xfinity equipment where you can bypass their router, and their IP Passthrough mode doesn’t work well.