【发布时间】:2021-11-12 16:16:37
【问题描述】:
这里有一个安全规则可以限制特定用户的访问:restrict access to specific users
弗兰克的回答真的很有帮助而且很直接,但是如果我不使用 Firestore 身份验证怎么办?!
我想要实现的只是授予对仅来自我的域的请求的访问权限......只是域,没有身份验证......所以没有人可以使用邮递员例如向我的 firestore 数据库发送 GET 或 POST 请求。
有没有办法可以这样说:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.origin.matches(/<https://myCompany.com>/);
}
}
}
任何帮助将不胜感激。
【问题讨论】:
标签: firebase google-cloud-firestore firebase-security