dbremote.login('admin', 'xyz1234').then(function (arg) {
console.log("Admin logged in.");
console.log(arg);
and providing username/password in the db URL like this:
The last of these approaches leeds to a CORS preflight error, because afaik providing authentication with an OPTIONS call isn't valid or something along these lines. I couldn't find a way around this, though. Both the webserver and the CouchDB server are running in the same domain, so there wouldn't be a need for CORS anyway, but I couldn't find a way to disable it, either.
What can I do to get authenticated replication over HTTPS working?
Thanks
Oliver
./letsencrypt-auto certonly --standalone -d mydomain
cd /etc/letsencrypt/live/mydomain/
cat cert.pem fullchain.pem privkey.pem > all.pem
frontend https-in
bind 123.123.123.123:443 ssl crt /etc/letsencrypt/live/mydomain/all.pem
use_backend bk_ssl_couchdb if { hdr_end(host) -i mydomain }
default_backend bk_ssl_default
backend bk_ssl_couchdb
server couchdb 127.0.0.1:5984 check
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
[httpd]
port = 5984
bind_address = 127.0.0.1