2014-03-31 53 views

回答

0

Firebase支持一個安全規則系統,用於定義誰可以在Firebase中讀取或寫入信息。要這樣寫JSON定義它們:

{ 
    "rules": { 
    "foo": { 
     // /foo/ is readable by the world 
     ".read": true, 

     // /foo/ is writable by the world 
     ".write": true, 

     // data written to /foo/ must be a string less than 100 characters 
     ".validate": "newData.isString() && newData.val().length < 100" 
    } 
    } 
} 

有很多更多這個主題比適當放堆棧溢出的答案,那麼請查看Firebase's official documentation on security