通过rest api更新安全规则 [英] updating security rules through rest api
问题描述
Len
> https://YOUR_FIREBASE.firebaseio.com/.settings/rules.json?auth=FIREBASE_SECRET
例如,curl:
pre $ curl -X PUT -d'{rules:{.read:true} }'https://YOUR_FIREBASE.firebaseio.com/.settings/rules.json?auth=FIREBASE_SECRET
您可以从Forge的Auth面板获取Firebase秘密(例如,访问 https://YOUR_FIREBASE.firebaseio.com / 并点击Auth页面)
Is it possible to update security rules through rest api? I have been trying to update rules by trying to update parts of the "rules" location but have been getting 400 response code.
Len
You can do a PUT to the following endpoint:
https://YOUR_FIREBASE.firebaseio.com/.settings/rules.json?auth=FIREBASE_SECRET
For example, with curl:
curl -X PUT -d '{ "rules": { ".read": true } }' https://YOUR_FIREBASE.firebaseio.com/.settings/rules.json?auth=FIREBASE_SECRET
You can get your Firebase Secret from the "Auth" panel of Forge (i.e. go to https://YOUR_FIREBASE.firebaseio.com/ and click the "Auth" page)
这篇关于通过rest api更新安全规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!