Skip to content

Commit

Permalink
fix: restrict to /_users/
Browse files Browse the repository at this point in the history
Probably not a good idea to expose all CouchDB routes...

BREAKING CHANGE: only requests to the _users DB are proxied
  • Loading branch information
tlvince committed Nov 12, 2015
1 parent af73174 commit c4f122e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions readme.md
Expand Up @@ -7,8 +7,8 @@
[travis-url]: https://travis-ci.org/tlvince/hassock
[travis-image]: https://img.shields.io/travis/tlvince/hassock.svg

Passes through any requests as-is to CouchDB, optionally setting an HTTP auth
header if `DB_USERNAME` and `DB_PASSWORD` are set.
Passes through any requests to `/_users/` as-is to CouchDB, optionally setting
an HTTP auth header if `DB_USERNAME` and `DB_PASSWORD` are set.

Intended to be used to manage (regular) CouchDB user accounts. Allows you to
keep your CouchDB admin account credentials out of your client code, whilst
Expand Down
2 changes: 1 addition & 1 deletion server.js
Expand Up @@ -20,7 +20,7 @@ var db = {
password: process.env.DB_PASSWORD
}

app.all('*', function (req, res) {
app.all('/_users/*', function (req, res) {
var opts = {
uri: db.url + req.url,
method: req.method
Expand Down

0 comments on commit c4f122e

Please sign in to comment.