I have following IngressRoute & Middleware definitions. http://qa.domain.com works in works in Chrome, Safari, MS Edge. But Firefox I get 404 page not found. Again https://qa.domain.com works in all browser.
requests.exceptions.SSLError: HTTPSConnectionPool(host='qa.domain.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))
I am using cert-manager to get letsencrypt certificates. Confirmed I have valid certificate stored in secret qa-cert
Can you please validate your SSL certificate using one of the existing online SSL checkers just to make sure that the given cert is correct?
I assume that something is wrong with the certificate and that's why it works correctly with selected browsers/tools.
Perhaps, the intermediate certificates are missing in the server certificate chain.
As you said its working in the other browsers (and is also showing the correct/valid certificates there) I assume it has something to do with the browser maybe?
Maybe your https redirect is not working at all, but all the other browsers have something like "https everywhere" in place, that is automatically redirecting to https in case it exists?
Could you share the redirect and the entrypoint part of your configuration?
After reading up on the topic of https everywhere features, I'm pretty sure it is not implemented in any browser. At least not in the way it would automatically detect if there is a https redirect possible. Extensions like "HTTPS Everywhere" build on YOU sending in rulesets for the redirects.
Your setup looks good imho. Only weird thing is, that you basically also attach the https redirect to the router on the websecure entrypoint. But I'd guess this would be ignored then. And if it wouldn't, why would Firefox be the only browser having issues?
Maybe something with caching in the browsers? Have you tried in a private window? Or deleteing browser data?
Have you tried using plain old curl? Like curl -v http://qa.domain.com?
In general I do the https redirect on the entrypoint static configuration in the traefik configuration file. Maybe that is worth a try? Of course this only works in case you redirect all of your non-https traffic to https. But if you do you can find my static entrypoint config in this issue.
Another idea that came to my mind was maybe some proxy config, that you have setup in all other browser, but not in FF?
Sorry, I don't really know a solution there. Just throwing in some ideas.
@razr Thanks for the suggestion. After reading your comment I tried to search similar issue and found this which pointed me here
If you need to define the same route for both HTTP and HTTPS requests, you will need to define two different routers: one with the tls section, one without.
I had completely missed this in my traefik setup. After splitting IngressRoute into two Firefox/curl was able to load the page with https redirect.
Remember, that you can now remove the redirect from your -secure ingress route, as it does not do anything anymore. Not sure if it hurts if it stays though.
Also your non-secure router no does not hit the application with any traffic anymore. To reflect this, there is the noop@internal service you could use here.
And in case you are exclusively using https connections you can also globally define the https redirect in your static configuration (see here EntryPoints - Traefik | Site | v2.4). That way you can get rid of the non-secure ingress route entirely!