我正在使用设计文档来确保只有所有者才能修改文档。如何防止 couchdb 复制此设计文档?
您可以使用过滤选项 http://pouchdb.com/api.html#replication in changes()
and replicate()
, e.g.
var opts = {
live: true,
filter: function(doc) {
return doc._id.indexOf('_design') !== 0;
}
};
var db = new PouchDB('todos');
db.replicate.to('http://localhost:5984/todos', opts);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)