firebase --version 8.4.1
使用Firebase初始化,我创建了一些文件。
现在,firebase部署正在抱怨firebase.storage。错误消息是:
规则集使用旧版本(版本[1])。请更新为最新版本(版本[2])。
这怎么了?
firebase deploy
deploying database, storage, firestore, functions, hosting
database: checking rules syntax...
database: rules syntax for database $db is valid
firebase.storage: checking storage.rules for compilation errors...
undefined:undefined - Ruleset uses old version (version
[1]). Please update to the latest version (version [2]).
firebase.storage: rules file storage.rules compiled successfully
cat storage.rules
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth!=null;
}
}
}
您应该继续使用security rules version 2。注意第一行:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth!=null;
}
}
}