CouchDB Cookie Authentication Using HTTPS

I configured my CouchDB using HTTPS, using exactly the instructions 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, for example 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 log in using the -ucurling option . But I always had a mistake unauthorized. I'm not sure what is wrong here. Thanks, advanced!

+4
source share
1 answer

- , . cookie, .

curl -kX POST -u admin:admin https://localhost:6161/_session \
     -H 'Content-Type:application/x-www-form-urlencoded' \
     -d 'name=admin&password=admin'

, , require_valid_user = true, cookie REST API, HTTP, HTTP.

: cookie? , cookie? ?

+1

Source: https://habr.com/ru/post/1543620/


All Articles