0
如果將此配置集成到JS中,那麼這不會是一個安全問題,因爲任何人都可以打開JS文件,訪問此詳細信息並訪問我的Firebase DB?需要幫助瞭解Firebase配置安全性
var config = {
apiKey: "xxxx",
authDomain: "xxx.firebaseapp.com",
databaseURL: "https://xxx.firebaseio.com",
storageBucket: "xxx.appspot.com",
messagingSenderId: "0000"
};
如何確保它是安全的?
任何可通過互聯網訪問的數據庫都可以通過sone找到。您可以通過設置誰可以訪問它以及他們可以做什麼的規則來確保數據庫的安全。對於Firebase,這些規則在[此處](https://firebase.google.com/docs/database/security/)中進行了說明。另請參閱我的答案在這裏:http://stackoverflow.com/questions/35418143/how-to-restrict-firebase-data-modification/35419194#35419194 –