Weird issue with Cloudflared. specific path works with http but not https

I have a very weird issue with cloudflare tunnel.
I am tunneling KiwiSDR and running cloudflared tunnel on the beaglebone.
/kiwisdr.min.js and a few other files will get 502 Bad Gateway/Cloudflare error when users try to visit the URL via https. When visiting via http, everything works fine. This is very weird. In the cloudflare tunnel config file, I’m pointing to http://localhost:8080
Cloudflare tunnel log show no error.

Here are log files when I increase loglevel to debug

{"level":"debug","time":"2021-11-08T08:03:41Z","message":"CF-RAY: 6aad494aba76f555-SEA GET http://localhost:8080/kiwisdr.min.js?q=3b232 HTTP/2.0"}
{"level":"debug","CF-RAY":"6aad494aba76f555-SEA","Header":"map[Accept:[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9] Accept-Encoding:[gzip] Accept-Language:[en-US,en;q=0.9,zh-CN;q=0.8,zh-TW;q=0.7,zh;q=0.6] Cache-Control:[no-cache] Cdn-Loop:[cloudflare] Cf-Connecting-Ip:[2001:470:a:24e::2] Cf-Ipcountry:[US] Cf-Ray:[6aad494aba76f555-SEA] Cf-Visitor:[{\"scheme\":\"https\"}] Cf-Warp-Tag-Id:[8d4bb752-f07b-4860-9aef-074581b7426c] Cookie:[ident=; kiwi=; last_audio=1; last_pan=0; readme=seen2; id-news=seen; id-confirmation=seen; id-ext-controls=seen; last_spec_peak=0; last_slow_dev=0; last_spec_filter_param=0.20; last_compression=1; last_hang=0; last_agc=1; last_thresh=-100; last_manGain=50; last_threshCW=-130; last_slope=6; last_wf_filter_param=0.00; last_wf_filter=3; last_spec_filter=0; last_de_emphasis=0; last_nb_algo=0; last_nr_algo=0; last_aper=1; last_cmap=0; last_admin_navbar=sdr_hu; last_ceil_dB=30; ext-controls=seen; last_decay=1000; last_floor_dB=-5; last_9_10=1; last_optbar=optbar-wf; last_mode=usb; last_zoom=6; freq_memory=[\"5371.31\",\"5371.32\",\"5371.33\",\"5371.34\",\"5371.35\",\"5371.36\",\"5371.37\",\"5371.38\",\"5371.39\",\"5371.40\",\"5371.41\",\"5371.42\",\"5371.43\",\"5371.44\",\"5371.45\",\"5371.46\",\"5371.47\",\"5371.48\",\"5371.49\",\"5371.50\",\"3684.08\",\"3890.99\",\"3558.45\",\"3558.70\",\"3573.72\"]; last_freq=3573.72; CF_Authorization=] Pragma:[no-cache] Sec-Ch-Ua:[\"Microsoft Edge\";v=\"95\", \"Chromium\";v=\"95\", \";Not A Brand\";v=\"99\"] Sec-Ch-Ua-Mobile:[?0] Sec-Ch-Ua-Platform:[\"Windows\"] Sec-Fetch-Dest:[document] Sec-Fetch-Mode:[navigate] Sec-Fetch-Site:[none] Sec-Fetch-User:[?1] Upgrade-Insecure-Requests:[1] User-Agent:[Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.44] X-Forwarded-For:[2001:470:a:24e::2] X-Forwarded-Proto:[https]]","host":"receiver.n7dmr.com","path":"/kiwisdr.min.js","rule":0,"time":"2021-11-08T08:03:41Z","message":"Inbound request"}
{"level":"debug","time":"2021-11-08T08:03:41Z","message":"CF-RAY: 6aad494aba76f555-SEA Request content length 0"}
{"level":"debug","time":"2021-11-08T08:03:42Z","message":"CF-RAY: 6aad494aba76f555-SEA Status: 200 OK served by ingress 0"}
{"level":"debug","time":"2021-11-08T08:03:42Z","message":"CF-RAY: 6aad494aba76f555-SEA Response Headers map[Content-Encoding:[gzip] Content-Type:[application/x-javascript] Server:[KiwiSDR_Mongoose/1.470]]"}

cloudflared log seem like it’s getting content at zero length. That’s very weird as I don’t understand why when visiting via http would be fine just visiting with https would be a problem. There seem like some rules within Cloudflare that handle the request differently.