Remote access to HA stopped working after an update

Accessing remotely my HA via Duckdns and NGINX. After the recent update I am getting the error:
“400: Bad Request”

Restarted and checked both Duckdns and NGINX services. Both logs look fine. What am I missing?

From what version to what version?

“Recent” isn’t a version.

Most likely the very first breaking change here: 2021.7: A new entity, trigger IDs and script debugging - Home Assistant

If you are using Nginx for reverse proxy, you will need to add the following line in your configuration.yaml-

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24  # Add the IP address of the proxy

For the IP address, you should have an error logs (Configuration —> Logs) regarding reverse proxy. This should contain the IP address that you need to put inside the above code.

Note: if you are using Nginx add on, you can just use 172.30.33.0/24 which is the internal docker IP address range used by Home Assistant addon.