I've got a site set up with the Patrol plugin, and it forces the HTTPS and www on most pages fine. I've got the
sslRoutingRestrictedUrls set in my general.php config file (just like in the github example). It works 99% of the time.
But it doesn't work right for 404s.
But when I got to a broken page, http://mysite.com/brokenpageurl, it doesn't redirect.
My 404.twig template lives in the root of the templates directory. So if I go to mysite.com/404, it automatically redirects to https://www.mysite.com/404 - because it's a real page.
But when another page exits to a 404, it doesn't redirect.
I'm wondering if the 'exit to 404' rendering bit happens before patrol gets a chance to do its redirect.
On Craft 3.3.19 and Patrol 3.1.3. But I can reproduce the issue on a couple of different sites.
Edit: I made a ticket on github too.