Update 2015.12.18
After many trials, I came to the second solution outlined. All you have to do is install nginx using the module-more headers. Add the following to your nginx-config:
location / { # forward all request headers to backend proxy_pass_request_headers on; # these settings come from the CouchDB wiki proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # your CouchDB backend proxy_pass http://127.0.0.1:5984; # replace WWW-Authenticate header in response if authorization failed more_set_headers -s 401 'WWW-Authenticate: Other realm="App"'; } # location to handle access to Futon location /_utils/ { # forward all request headers to backend proxy_pass_request_headers on; # these settings come from the CouchDB wiki proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # your CouchDB backend proxy_pass http://127.0.0.1:5984; # DO NOT replace WWW-Authenticate header in response if authorization failed # more_set_headers -s 401 'WWW-Authenticate: Other realm="App"'; # Handle redirects proxy_redirect default; }
And yours are tuned. You can continue to use pouchdb authentication or write your own login handler.
Original post
Sorry to answer, but I can not comment (yet).
I am suffering from the same problem, even worse, that in OS X the WWW-Authenticate parameter goes down with every restart of CouchDB and therefore is no longer recognized. Therefore, it must be installed after restarting EACH using Futon / Fauxton or the API.
You can try playing with the following parameter (see http://docs.couchdb.org/en/1.6.1/api/server/authn.html ). Basically, you send your auth request (example in angular2):
In my setup, the web application and CouchDB are served from two different sources. I can only get this working if I disable web security in Chrome due to cross-origin restrictions. I believe that a reverse proxy could rewrite the redirect response, for example. using nginx proxy_redirect ( http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect ).
I believe the best solution is to change the response headers with reverse proxies. For nginx, there is a module called ngx_headers_more (see https://github.com/openresty/headers-more-nginx-module#readme ) that should be able to do this. You can check the response for 401, and then change the header from authentication: from Basic to Authentication: Other, so disabling the modal. Basically, Futon / Fauxton should still work then, no? I have not tried this approach yet, but in the nginx location block you need to specify
more_set_headers -s 401 'WWW-Authenticate: Other realm="App"'
I hope someone more qualified can add their two cents.