CF Tunnel too many requests with searxng

I’ve set up searXNG in my home and I want to access it through a tunnel. It works perfectly on my home network but when I try to access it through a tunnel I get ERR_TOO_MANY_REDIRECTS I have disabled searXNG limiting features as I’ve found others have online but I still get the same error.

Is the tunnel set to use HTTPS?

Its using HTTP when I used HTTPS it gives Bad Gateway Error code 502

You’ll have set a redirect somewhere, it’s hard to help without knowing anything.

I have installed searXNG in a docker container on an ubuntu container through proxmox. I am able to access it and use it inside my local network accessing it by its ip address. I set up a Cloudflare tunnle in another docker container. But when I access it through the tunnel I get the error. Is there anything else you would like to know?