3 ms·
Limiting writes would be fairly easy. You could have an onWrite Function trigger[0] that writes activity to a rate limit Firestore document. When new write requ
by abraham 8y ago
Limiting writes would be fairly easy. You could have an onWrite Function trigger[0] that writes activity to a rate limit Firestore document. When new write requests come in, the Firestore rules can read that rate limit docuemnt and decide if the particular write should be allowed or not.
Limiting reads is interesting. I think generally the idea is data is cheap enough that most people don't have to worry about it. If you do you could gate access through an API in a Function.
[0] https://firebase.google.com/docs/functions/firestore-events https://firebase.google.com/docs/functions/firestore-events
[1] https://firebase.google.com/docs/firestore/security/rules-conditions#access_other_documents https://firebase.google.com/docs/firestore/security/rules-co...