Cloudflare access with an existing SSL certificate

Hi, i am trying to setup a web app to be behind cloudflare access, the problem is that this application only accepts HTTPS requests,

so when my cloudflared config.yml is setup this way
http://localhost;80 i get an error 400 that an HTTP request was sent to an HTTPS port, when i change it to https://localhost:80 or https://localhost;443 i get 502 bad gateway from cloudflare access,

i have been trying to get this solved for over 4 days now and would like some help with cloudflare access

The cloudflared logs would be your best friend. It could be due to invalid common name (e.g. the common name of your SSL certificate www.example.com does not match the hostname localhost that you specified in https://localhost:443). If my guess is correct, try adding no-tls-verify: true in your config file.