gpt4 book ai didi

javascript - 如何防止 Meteor 将集合中的所有文档发送给客户?

转载 作者:行者123 更新时间:2023-11-28 02:31:33 25 4
gpt4 key购买 nike

使用 Meteor.subscribe() 时,如何关闭默认的“订阅集合的所有文档”行为?

最佳答案

默认情况下,新的meteor应用程序包含autopublish包,它负责该行为。要阻止这种情况发生,请在 meteor 应用主目录的命令行中输入 meteor remove autopublish 来删除该包。

参见http://docs.meteor.com/#dataandsecurity欲了解更多信息:

By default, a new Meteor app includes the autopublish and insecure packages, which together mimic the effect of each client having full read/write access to the server's database. These are useful prototyping tools, but typically not appropriate for production applications. When you're ready, just remove the packages.

关于javascript - 如何防止 Meteor 将集合中的所有文档发送给客户?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14074769/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com