2

我可以通过以下方式读写安全规则吗

var firebaseRef = new Firebase('https://YOUR_FIREBASE.firebaseio.com/.settings/rules');
firebaseRef.set(rulesJson);
4

1 回答 1

4

不,但您可以使用 REST API 来读取或写入安全规则:https ://www.firebase.com/docs/rest-api.html

curl https://SampleChat.firebaseio-demo.com/.settings/rules.json?auth=FIREBASE_SECRET
curl -X PUT -d '{ "rules": { ".read": true } }' https://SampleChat.firebaseio-demo.com/.settings/rules.json?auth=FIREBASE_SECRET
于 2013-09-18T00:23:53.953 回答