如何在我的firebase安全规则中添加“.indexOn”?

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

我的前端有这个警告

enter image description here

我在firebase中的数据是这样的:

enter image description here

基本我有一把钥匙后,我尝试这个规则:

{
"rules": {
".read": true,
".write": true,
 "workers": {
    "report":{
   "basic":{
      "$groupid":{
        ".indexOn": "date"
     }}
   }
  }
 }
}

但警告仍然存在!

如何在firebase中配置规则?

firebase firebase-realtime-database firebase-security-rules
1个回答
2
投票

认为$groupid不是必需的,因为错误消息没有它:

{
  "rules": {
    ".read": true,
    ".write": true,
    "workers" {
      "report" {
        "basic" {
          ".indexOn": "date"
        }
      }
    }
  }
}

......并考虑增加进一步的安全规则;这些权限与网络服务器上的777相似。

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