1
比方說,我有文章的集合:唯一的IP寫權限火力地堡收集
https://example.firebaseio.com/articles/$key
而且我想一個viewCounter
和currentUsersCounter
孩子添加到articles
。
https://example.firebaseio.com/articles/$key/viewCounter
https://example.firebaseio.com/articles/$key/currentUsersCounter
我執行一個功能隨時隨地用戶已滾動到下一篇文章:
var currentArticle = function(key){
//key == index of the article
//This is where I want to increment the `viewCounter` and `currentUsersCounter`
}
很顯然,我不希望任何人寫什麼更那麼這兩個孩子。
如何在我的安全規則擴大目前(黑列出所有寫操作)到白名單隻爲這些特定的集合寫?
我怎麼會限制寫入唯一的IP地址,在我的安全規則,這些白名單的集合? (如果可能)
目前黑列出所有寫道:
{
"rules": {
".read": true,
".write": "auth.email == '[email protected]'"
}
}
使用服務器側代理隱瞞火力URL和用戶活動執行無限認證/驗證。 – dandavis
@dandavis是的,如果它歸結爲,我想這就是我必須要做的。希望能夠通過Firebase API利用某種「魔術」輔助功能。 –
你可以用自己的規則將這些信息放在不同的集合中嗎? – dandavis