来自Firebase中数据库的警告消息 [英] Warning message from databases in Firebase

查看:48
本文介绍了来自Firebase中数据库的警告消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Firebase收到以下消息.我该怎么办?

I received the following message from Firebase. What am I supposed to do?

您选择开始在测试模式"下进行开发,从而使您的实时"状态保持不变数据库实例完全向Internet开放.因为这个选择使您的应用容易受到攻击者和数据库安全规则的攻击被配置为在前30天后停止允许请求.在5天后,对您的实时数据库实例的所有客户端请求都将被拒绝.在此之前,请将您的安全规则更新为允许您的应用正常运行,同时适当保护您的数据.每天运行分析;如果您在最近24天内修改了规则这些更改可能无法计算的小时数.

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中的数据库中找到的

And this is what I found in databases in Firebase

{
  "rules": {

    ".read": "now < 1602709200000",  // 2020-10-15

    ".write": "now < 1602709200000",  // 2020-10-15
  }
}

推荐答案

除了当前的安全规则外,您还需要为数据库设置一些安全规则.您应该阅读有关如何定义它们的信息.

You need to set some security rules for your database other than the current ones. You should read about how to define them.

您当前的规则意味着,如果他们的请求在2020年10月15日之前发送,则每个人都可以读写您的数据库.因此,除非您在接下来的5天内进行设置,否则您的服务将不可用.

Your current rules mean that everyone can read and write to your database if their requests are sent before 15th October 2020. So unless you set them in the next 5 days, your service will be unavailable after that.

这篇关于来自Firebase中数据库的警告消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆