diff options
author | Jan Lehnardt <jan@apache.org> | 2010-01-30 01:22:36 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2010-01-30 01:22:36 +0000 |
commit | 8b3d706b70bd55f5a3a37ff48c9b809aacf2a8cb (patch) | |
tree | 3028fc74a061c701d129acc479c3e6ea1447ac0b /share/www/script/couch.js | |
parent | ee09a0de9f8356abe24a0ac0f26cdff35f8fa704 (diff) |
Allow Futon to run behind a HTTP proxy.
Depending no the Proxy's RFC 2616 compliance,
some tests might fail (looking at you, nginx).
Patch by Jack Moffit and Damjan Georgievski.
Closes COUCHDB-321.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@904705 13f79535-47bb-0310-9956-ffa450edef68
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 cb6fab89..f5f23f90 100644 --- a/share/www/script/couch.js +++ b/share/www/script/couch.js @@ -321,6 +321,7 @@ function CouchDB(name, httpHeaders) { // CouchDB.* functions (except for calls to request itself). // Use this from callers to check HTTP status or header values of requests. CouchDB.last_req = null; +CouchDB.urlPrefix = ''; CouchDB.login = function(name, password) { CouchDB.last_req = CouchDB.request("POST", "/_session", { @@ -411,7 +412,7 @@ CouchDB.newXhr = function() { CouchDB.request = function(method, uri, options) { options = options || {}; var req = CouchDB.newXhr(); - req.open(method, uri, false); + req.open(method, CouchDB.urlPrefix + uri, false); if (options.headers) { var headers = options.headers; for (var headerName in headers) { |