Link interception issues with subfolder setup?

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);

  }
});
4 Likes

@neil is this an open bug on tudiabetes?

@sam TuDiabetes decided not to use a subfolder setup anymore and have moved to a subdomain.

2 Likes

I am not seeing this issue on https://www.gamekult.com/forum/ which is a forum we host. The custom header links just fine to other parts of the domain.

Can you still repro this @rohmann?

1 Like

This topic was automatically closed after 6 days. New replies are no longer allowed.