Firebase storage image link 403 forbidden

Hello I follow freecodecamp video on youtube " Full Stack React & Firebase Tutorial - Build a social media app "

I hold at 2:08:00

I upload some image for my Firebase storage. I modify the rules on storage. But I got page with it’s link: 403 Forbidden openresty. (Otherwise still work fine but I now stucked) Please answer somebody know the solution. Thank you

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read;
    }
  }
}

So this is a good question!! The firebase rules are a little confusing. I think this is what it should be:

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read: if true;
    }
  }
}

Let me know if that helps.

For future people that rule should make it show anyone will be able to read the images.

Here are some examples:

Firestorage Examples:
https://firebase.google.com/docs/storage/security/core-syntax

This is for firestore but it’s really close and has more example
https://firebase.google.com/docs/firestore/security/get-started

1 Like

Sorry it not helps the problem

Can you share the page, is it public?

The firebase support give me the answer! In the url was a misspelled. That’s why the forbidden. It’s not inherit from the firebase storage rules. Although this rule is very unsecure!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.