diff options
Diffstat (limited to 'share/www/script/couch.js')
-rw-r--r-- | share/www/script/couch.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js index 33fd82ba..9c81605a 100644 --- a/share/www/script/couch.js +++ b/share/www/script/couch.js @@ -402,7 +402,8 @@ CouchDB.request = function(method, uri, options) { options.headers["Content-Type"] = options.headers["Content-Type"] || options.headers["content-type"] || "application/json"; options.headers["Accept"] = options.headers["Accept"] || options.headers["accept"] || "application/json"; var req = CouchDB.newXhr(); - if(uri.substr(0, "http://".length) != "http://") { + var proto = window.location.protocol + "//"; + if(uri.substr(0, proto.length) != proto) { uri = CouchDB.urlPrefix + uri } req.open(method, uri, false); |