Left-clicking same-domain links to URLs not on the whitelist is broken

I just found another variation on this bug.

We migrated our forum from phpBB to Discourse and we added redirects at the HTTP server level so that old-style URLs like https://forum.pololu.com/viewtopic.php?f=30&t=10092 will get redirected to the new Discourse-style URLs and continue to work. It is super common on our forum for people to post links to other forum threads that have related information, so it is common to find an old-style URL inside a link in the body of a forum post. All of those links are now broken because we assumed that the HTTP server redirects would be honored. They are not being honored because of the way the Discourse/Ember router was designed; it just assumes that because it does not know about the URL, the URL is invalid.

As an example, if I go to this thread and left-click “WS2812B LED app”, the link doesn’t work because of the Discourse/Ember router. It does work if I refresh or open the link in the new tab.

–David