PouchDB replication of design documents

我是研究僧i 提交于 2019-12-05 19:16:54

My standard advice to folks is to never replicate design documents. It's just too confusing and security-risky.

Therefore when you replicate, you can just do a filter to exclude any documents whose IDs start with _design/. On the client side, you just create whatever ddocs you need, and ditto with the server.

On the other hand, this doesn't prevent a malicious user from attempting to overwrite design documents on the server-side. (In case you are also using server-side ddocs.) The only way to prevent that is with a validate_doc_update function, which you can use to prevent non-admins from overwriting design docs.

Hope that helps!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!