New: Support for running from a sub folder (reverse proxy)

This commit is contained in:
Mark McDowall 2014-01-01 22:56:19 -08:00
commit b5c9a811dd
22 changed files with 161 additions and 89 deletions

View file

@ -2,8 +2,9 @@
define(
[
'backbone',
'jquery'
], function (Backbone,$) {
'jquery',
'System/StatusModel'
], function (Backbone, $, StatusModel) {
//This module will automatically route all relative links through backbone router rather than
//causing links to reload pages.
@ -45,7 +46,9 @@ define(
if (!href.startsWith('http')) {
Backbone.history.navigate(href, { trigger: true });
var relativeHref = href.replace(StatusModel.get('urlBase'), '');
Backbone.history.navigate(relativeHref, { trigger: true });
}
else {