Cloudflare tunnel from OpenWRT

I have set up a Cloudflare tunnel on my OpenWRT router. I have access to HA via a public hostname in cloudflare. when I visit ha.domain.com, I do get 400 Bad Request error. So I assume I am reaching HA


I have the following config too (even tried with HTTP external_url):

homeassistant:
  external_url: "https://ha.domain.com"

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24

I still get 400 error. how can I fix this?

Within Cloudflare

Click on your tunnel, click the connector that you’re using
Begin live stream of the logs, this should help you understand what’s going on

Thought I’d set one up and I got a 400 too but fixed with the correct trusted proxy

Cloudflare

Configuration.yaml

http:
  use_x_forwarded_for: true
  trusted_proxies: 10.0.0.0/24

thank you that fixed the issue