I’m not entirely sure what it is you are trying to do here. It sounds like you are wanting to setup your cloudflare tunnel/HA to require a cert to be able to access the URL. If that is correct there are few steps you need to do for this to work. Below is a thread that outlines these steps pretty well. I would suggest having a read and see if this is what you are trying to do
Home Assistant App through Cloudflare Tunnel - Mobile Apps - Home Assistant Community
One thing to note is this doesn’t work for IOS devices.