diff options
author | Garren Smith <garren.smith@gmail.com> | 2013-11-25 11:57:21 +0200 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2013-11-25 11:57:21 +0200 |
commit | bf4bacbb72bc18c1b56dcbf77218fe2483288737 (patch) | |
tree | 6c1dd6bc5ac609c379c94f2cf44698f05f9f6dd7 | |
parent | 376bde8e409e75680610df7daf0c280c9fa59fab (diff) | |
download | couchdb-1937-fauxton-proxy.tar.gz |
Fix so Fauxton still works as couchdb app1937-fauxton-proxy
-rw-r--r-- | src/fauxton/app/app.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fauxton/app/app.js b/src/fauxton/app/app.js index d5c9d1e40..98714ab16 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 || {}; |