-2

I have made an app which show pdf files and some data which are store in firestore database. And no need to signup or login to read the data through app. But I am getting mail from firebase to update security rules and I have no ideas about firebase security rules.

Can you suggest me the secure rules for firestore database so that user can able to read the data but can't allow to perform write operation.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441

1 Answers1

1

You should first read the documentation on security rules. There is plenty of information out there to use as a guide, especially the basic rules.

You will have to give read access to each collection individually in order to avoid getting the warning email. Taking the pattern from the linked documentation, if the collection you want to give access is named "cities":

    match /cities/{city} {
      allow read;
    }

Since we don't know the names of your collections, we can't tell you exactly what to do.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441