I wonder why itās there if Iāve turned it off. But I really wouldnāt mind if HTTPS was working. I set it up with a heroku server and no matter what I do it says something like HTTPS is not supported for this setting.
Before getting crazy with HTTPS however, I want to know how I can get my heroku app to always redirect to www. Hereās what my current setting looks like:
* Added nollywooddb.com:80:123.123.123.123 to DNS cache
* Hostname nollywooddb.com was found in DNS cache
* Trying 123.123.123.123...
* TCP_NODELAY set
If you get the exact same result (stuck at āTCP_NODELAYā set) that would mean that youāre un-able to connect to your server at allā¦ if the server is up, that would mean that youāre firewalled out?
Perhaps the server is behind some NAT and youāre attempting within the NAT? If thatās what you do, then you need to use the internal IP of the server, not the public facing oneā¦
Thank you @sdayman . Now to tackle my HTTPS problem, I turned it on again as Full Strict. Visiting this URL https://www.nollywooddb.com/ , I get a 525 Error that the SSL configuration used is not compatible with Cloudflare. What can be done to fix that? What I noticed however, is that the HTTP version uses HTTP 1.1 meanwhile the HTTPS version used HTTP v2
Iād have to see the TLS certificate on the origin server (does it even have one?) to see what the problem is. It sounds like Cloudflare doesnāt like whatever it is. Have you tried using the Full (not strict) setting?
Thereās no cert from the origin server. I just switched to Flexible because it works. Full gives the same error. Iād suppose Flexible means it should proceed whether or not thereās TLS cert from origin server. Iām using heroku and I donāt think it offers certs for free. Iāll have to purchase it I guess
You can use Full mode (or even Full(strict) mode last I checked) with Heroku on Cloudflare w/ any plan. Hereās what you need to do:
ā¢ Point www.example.comCNAMEmy-app.herokuapp.com [orange-cloud]
ā¢ Go to Crypto ā Origin Certificates ā Create Certificate (keep the default settings). These are free
ā¢ Keep the module with the Public and Private Key open.
ā¢ Go to your Heroku app ā Settings ā Configure SSL ā> Paste Contents:
ā¢ Finally, go into Cloudflare Workers (perhaps you donāt need to do this anymore, Iām not sure) and add this snippet:
addEventListener(āfetchā, event => event.respondWith(handle(event.request)))
async function handle(request) {
let url = new URL(request.url)
url.hostname = 'my-app.herokuapp.com'
return fetch(url.toString(), request)
}
ā¦ and set the route to www.example.com/*
ā¢ Turn on Always Use HTTPS
Voila! Full mode means that the Origin Server needs to have an SSL certificate served. That certificate can be self-signed, from Letās Encrypt or (for optimal performance and security directly from Cloudflare)!
@franklin this is really useful and helpful information but I canāt configure SSL yet on Heroku because Iām not using a paid dyno. Iām still on the free dyno because my app is at alpha and Iām not willing to put money into it yet. I believe your answer will remain valid for me to reference when I do make an upgrade on heroku. Then Iāll try to change from Flexible to Full HTTPS