I may have looked over something obvious, but I am having trouble getting my angular2 app to work through a proxy. To my understanding I have to hardcode the base href for the app and the router to work, this seems problematic when the base url can change if I am going through a proxy. For example, if I host my app at
http://mysite.com/ng2-app/ and then proxy to
http://mysite.com/public/app/ I get an error in the browser console:
Cannot match any routes. Current segment: 'public'. Available routes: ['/sample', '/request-form', '/', '/request-view'].
Is there a way to make the app relative to their root URL and never hardcode the root? Am I misunderstanding how something works or overlooking something?