如果Firebase安全规则字母到来,我该怎么办? [重复]

问题描述 投票:-1回答:1

收到的邮件需要做什么?

enter image description here

规则:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {

    // This rule allows anyone on the internet to view, edit, and delete
    // all data in your Firestore database. It is useful for getting
    // started, but it is configured to expire after 30 days because it
    // leaves your app open to attackers. At that time, all client
    // requests to your Firestore database will be denied.
    //
    // Make sure to write security rules for your app before that time, or else
    // your app will lose access to your Firestore database
    match /{document=**} {
      allow read, write: if request.time < timestamp.date(2020, 2, 15);
    }
  }
}

值得担心吗?如果什么都不做,这会中断应用程序吗?

firebase google-cloud-firestore firebase-security
1个回答
0
投票

您的安全规则设置为拒绝在规则中指定的日期对数据库的所有访问:

timestamp.date(2020, 2, 15)

[这是2020年2月15日。这可能会使您的应用停止运行。

如果需要,您可以将日期推迟,但是您绝对应该执行适当的规则,以使具有Internet连接的任何人都无法读取和写入数据库。

© www.soinside.com 2019 - 2024. All rights reserved.