【问题标题】:Firebase rules reset by themselvesFirebase 规则自行重置
【发布时间】:2017-06-02 02:21:12
【问题描述】:

我在文档中找不到这个问题的答案。 默认的 Firebase 规则是:

{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null"
   }
}

我已经将我的编辑成这样并保存了它们:

{
  "rules": {
    "users":{
      ".read": true,
        ".write": "auth != null"
    },
    ".read": "auth != null",
    ".write": "auth != null"
  }
}

没有我做任何事情,他们在 12 小时后随机重置为旧规则。我在这里错过了某种持久选项吗?

【问题讨论】:

  • 不,一旦您使用管理控制台发布了它们,它们就不应重置。
  • 知道为什么会这样吗?我应该联系支持吗?我只是在免费的 Spark 级别。
  • 不知道为什么。如果您想进行实验,请创建另一个项目,看看是否会发生同样的情况。如果是这样,也许将其作为错误提交。
  • 您似乎很可能正在部署 firebase-rules.json 作为使用 Firebase 工具运行 firebase deploy 的一部分。见this question。我以为还有一个关于它的更新的问题,但我现在找不到。
  • @FrankvanPuffelen 是的,就是这样。我现在在我的 firebase.json 中看到它。

标签: firebase firebase-realtime-database firebase-security


【解决方案1】:

从 cmets 中添加此内容,以免其他人错过。

您似乎很可能正在部署 firebase-rules.json 作为使用 Firebase 工具运行 firebase deploy 的一部分。见this question。我以为还有一个关于它的更新的问题,但我现在找不到它

【讨论】:

    猜你喜欢
    • 2018-09-10
    • 2017-06-15
    • 1970-01-01
    • 1970-01-01
    • 2020-08-19
    • 1970-01-01
    • 2018-10-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多