How it works...
So let's explain what we just wrote in the previous rules, line by line so we can understand the Firebase Storage Security rules mechanism:
-
service firebase.storage: This line is essential; we're simply telling Firebase about the service we're trying to secure, in our case it will be the Firebase/storage service.
-
match /b/{bucket}/o: This rule combines another powerful system, we're speaking mainly about the matching system, the Storage Rules uses this keyword to filter through files path, and what Firebase calls wildcards path also the match system supports nested matching, which is exactly what we're using in this example. Another interesting point is the matching against in this line: /b/{bucket}/o, this is simply ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access