firebase - Firebase 存储安全规则中有哪些不同类型的匹配?
问题描述
Firebase 存储安全规则中有哪些不同类型的匹配?如何匹配安全规则中的路径似乎非常令人困惑。请帮忙。谢谢!
解决方案
在 firebase 存储安全规则中,"match"
是一个关键字。
"match"
用于匹配特定的存储路径,以便您可以将规则应用于该位置。每条路径都以'/'
路径段开头。
有 3 种类型的路径段:
- 单段:引用特定文件。语法 -
match /images/profile.png
(仅匹配 /images/profile.png) - 单段通配符:引用特定路径级别的所有路径。语法 -
match /images/{images}
(匹配 /images/xyz.png,但不匹配 /images/screenshots/xyz.png) - 多段通配符:引用特定路径处或下方的所有路径。语法 -
match /images/{images=**}
(匹配 /images/xyz.png,也匹配 /images/screenshots/xyz.png)
希望能帮助到你。
推荐阅读
- selenium - 我无法单击 ComboBox 内的元素
- powershell - 在 Compare-Object 的同一结果集中进行比较
- angular - 获取文件的哈希
- angular - 使用 Angular NgFor 用 JSON 数组中的数据填充 html 数据表
- xamarin - Xamarin Forms 中的反向进度条
- excel - VB.Net Excel公式范围动态?
- python-3.x - 我无法在 Windows 10 上安装文本
- javascript - 在 JavaScript 中更新 Firebase 子节点?
- php - 如何检查常量数组项是否存在
- android - 如何从 Kotlin 中的静态上下文访问 Android 应用程序资源(即字符串)?