Hopefully this helps anyone running into a similar problem. Our subfolder/reverse proxy site involved some custom markup (header/footer/etc) where we have links to other sites on the same domain (behind the same reverse proxy). We ran into some link interception issues where if a user clicked https://example.com/another-site
they were taken to example.com/forum/another-site/
.
This modification solved it for us:
var DiscourseURL = require('discourse/lib/url').default;
DiscourseURL.reopen({
routeTo: function(path, opts) {
if ( ! this.isInternal(path) ) {
window.location = path;
return;
}
return this._super(path, opts);
}
});