Routes: Refresh dynamic url?

I have a simple question that i can’t seem to figure out.

In the “routes”, i’m using a dynamic URL for the base
image

“app_url” is set to “https://production.mysite.com”. I have an event to trigger and change “app_url” to “https://qa.mysite.com”.

However, even though that var “app_url” is changed, all the links that hit “/apppage” still goto the old value. Seems like the whole url gets cached.

Is there a simple way to refresh the routes so it uses the updated value of “app_url”?

Thanks!

This is how JS works in general:

var a = 'foo';

var b = a + '/test';

console.log(b); // -> 'foo/test';

a = 'bar';

console.log(b); // -> 'foo/test';

You need to update/replace routes manually then, look for view.router.routes object