I'd like to know how storage rules deployment works in Firebase.
In Firebase Storage I have 2 buckets app.appspot.com
and app-mybucket
. On my local machine I have a storage.rules
file which looks something like this:
service firebase.storage {
match /b/app.appspot.com/o {
match /{allPaths=**} {
allow read, write: if request.auth != null;
}
}
match /b/app-mybucket/o {
match /{userId}/{allPaths=**} {
allow read, write: if request.auth.uid == userId;
}
}
}
When I firebase deploy --only storage
these rules get sent to the default app.appshpot.com
bucket and nothing seems to get sent to app-mybucket
. I'd like to know of a way I can deploy rules to all buckets.