Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将firebase存储安全规则设置为公共_Firebase_Firebase Storage_Firebase Security - Fatal编程技术网

将firebase存储安全规则设置为公共

将firebase存储安全规则设置为公共,firebase,firebase-storage,firebase-security,Firebase,Firebase Storage,Firebase Security,我是firebase的新手,所以我想问的问题是如何将firebase安全规则设置为公共的。有人知道密码吗 以下是我的firebase现在的安全规则: rules_version = '2'; service firebase.storage { match /b/{bucket}/o { match /{allPaths=**} { allow read; allow write: if request.auth != null; } } } 你

我是firebase的新手,所以我想问的问题是如何将firebase安全规则设置为公共的。有人知道密码吗

以下是我的firebase现在的安全规则:

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read;
      allow write: if request.auth != null;
    }
  }
}

你的问题并不完全清楚“将firebase安全规则设置为公共”的具体含义。您的规则已经允许对默认存储桶进行完全公共读取访问。如果还希望允许完全公共写入访问,只需从“允许写入”行中删除该条件

这通常不是一个好主意,因为它允许任何具有internet连接的人完全修改和删除存储桶中的任何内容。如果您想学习如何正确使用安全规则,应该从

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read;
      allow write;
    }
  }
}