Happened to me with http. Once you successfully connect to the https endpoint, HTTP Strict Transport Security kicks in and you no-longer see it. just fyi.
Somewhere in your config there's a 301 redirect (UHOH!) to localhost, either as a cloudflare page rule or a misconfiguration on your origin server. If you use chrome you can remove HSTS for your domain here: chrome://net-internals/#hsts , this should at least allow you to replicate the problem (just don't visit the https version or it'll be enabled again.)