我收到了来自 Firebase 的以下消息。我该怎么办?
You chose to start developing in Test Mode, which leaves your Realtime Database instance completely open to the Internet. Because this choice makes your app vulnerable to attackers, your database security rules were configured to stop allowing requests after the first 30 days. In 5 day(s), all client requests to your Realtime Database instance will be denied. Before that time, please update your security rules to allow your app to function while appropriately protecting your data. Analysis is run daily; if you've modified your rules in the last 24 hours those changes may not be accounted for.
这是我在 Firebase 数据库中找到的内容
{
"rules": {
".read": "now < 1602709200000", // 2020-10-15
".write": "now < 1602709200000", // 2020-10-15
}
}
最佳答案
在实时数据库规则中设置此条件:
{
"rules": {
"users": {
"$uid": {
".read": "auth != null && auth.uid == $uid",
".write": "auth != null && auth.uid == $uid",
}
}
}
}
关于android - 来自 Firebase 中数据库的警告消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64280489/