I configured my CouchDB with HTTPS using exactly the instruction given in the documentation (only that I changed the ssl port to 6161). And I created two admins. Then when I tried to log in using cookie authentication like the following:
curl -kX POST https://localhost:6161/_session \
-H 'Content-Type:application/x-www-form-urlencoded' \
-d 'name=admin&password=admin'
The username and password are correct, as I can login using the -u
option of curl. But I always got unauthorized
error. I am not sure what is wrong here.