Updated Branches: refs/heads/1937-fauxton-proxy 376bde8e4 -> bf4bacbb7
Fix so Fauxton still works as couchdb app Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/bf4bacbb Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/bf4bacbb Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/bf4bacbb Branch: refs/heads/1937-fauxton-proxy Commit: bf4bacbb72bc18c1b56dcbf77218fe2483288737 Parents: 376bde8 Author: Garren Smith <[email protected]> Authored: Mon Nov 25 11:57:21 2013 +0200 Committer: Garren Smith <[email protected]> Committed: Mon Nov 25 11:57:21 2013 +0200 ---------------------------------------------------------------------- src/fauxton/app/app.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/bf4bacbb/src/fauxton/app/app.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/app.js b/src/fauxton/app/app.js index d5c9d1e..98714ab 100644 --- a/src/fauxton/app/app.js +++ b/src/fauxton/app/app.js @@ -43,9 +43,14 @@ function($, _, Backbone, Helpers, Mixins) { // move this to here otherwise every once in a while, // the footer fails to configure as the url for it is not configured. // Having the host declared here fixes it - host: "../..",//window.location.protocol + "//" + window.location.host, - urlPrefix: '../..' + host: "../.." }; + + // Kind of hacky - add this in so that Fauxton still works as a couchapp, + // we should look at moving the app.host configuration to grunt + if (window.location.href.match(/_design/)) { + app.host = window.location.protocol + "//" + window.location.host; + } // Localize or create a new JavaScript Template object. var JST = window.JST = window.JST || {};
