We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dedc8a2 commit c5c023eCopy full SHA for c5c023e
index.js
@@ -72,7 +72,7 @@ module.exports = function httpQuery(db, req) {
72
}
73
74
//strips the database from the requested_path
75
- var url = db.getUrl().split("/").slice(0, -2).join("/") + req.raw_path;
+ var url = db.name.replace(/\/[^\/]+\/?$/, "") + req.raw_path;
76
var pouchHeaders = (db.getHeaders || fakeGetHeaders)();
77
var headers = extend({}, pouchHeaders, req.headers);
78
0 commit comments