gpt4 book ai didi

Firebase 客户端对实时数据库的访问权限将在 X 天后到期

转载 作者:行者123 更新时间:2023-12-05 02:03:50 24 4
gpt4 key购买 nike

这是我从 firebase 收到的邮件。

Firebase Client access to your Realtime Database covid-19-tracker-17659 is expiring in 4 day(s)

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 4 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.

我的实时数据库规则

{
"rules": {
".read": true,
".write":true
}
}

我应该在我的安全规则中做些什么更改,以便我可以在测试模式下运行我的项目。

最佳答案

如果您的应用程序不允许来自客户端的任何写入操作,您可以将写入条件从 true 更改为 false web 访问和更改您创建的数据。

但是如果您的应用程序确实允许来自客户端的一些写操作并且您的应用程序使用登录身份验证,您可以添加此条件以允许那些登录到您的应用程序的用户。

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

关于Firebase 客户端对实时数据库的访问权限将在 X 天后到期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64861310/

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