CouchDB"所有"dbs 401未经授权';解决方案&x27;
所以,这发生在我的Windows10机器上,CouchDb 3.1.0和Postman 7.29.1。 在DB课程课上,我不能像我的老师那样做,并且访问:CouchDB"所有"dbs 401未经授权';解决方案&x27;,couchdb,http-status-code-401,solution,Couchdb,Http Status Code 401,Solution,所以,这发生在我的Windows10机器上,CouchDb 3.1.0和Postman 7.29.1。 在DB课程课上,我不能像我的老师那样做,并且访问: http://127.0.0.1:5984/_all_dbs 正在返回401错误: { "error": "unauthorized", "reason": "You are not authorized to access this db."
http://127.0.0.1:5984/_all_dbs
正在返回401错误:
{
"error": "unauthorized",
"reason": "You are not authorized to access this db."
}
我找了些东西,但什么也找不到,于是我开始胡闹起来。
**注意**
该解决方案适用于局部和不安全的环境,无论如何都具有解决任何其他问题的可行性
在CouchDB/etc中,打开default.ini,并更改以下行:
; When true, system databases _users and _replicator are created immediately
; on startup if not present.
single_node = true
; prevent non-admins from accessing /_all_dbs
admin_only_all_dbs = false
然后重新启动ApachCouchDB服务(或重新启动计算机)。瞧!
希望这能帮助其他人,如果我的回复重复,管理员可以随意删除它。
谢谢大家。
(m)任何拼写/语法错误的sry)
Obs:另一个可能发生的事情是新DB上的401。转到DB权限并从成员-角色中删除_Admin