Search code examples
firebasegoogle-cloud-firestorefirebase-security

Adding text before a wildcard in Firestore rules


Problem: I want to be able to add text before the wildcard "{id}".

What I've tried: I've tried to add the stringified text followed by a plus "+" and then the wildcard.

enter image description here


Solution

  • What you're trying to do is not possible with security rules. Wildcard matches must be on an entire path segment. They can't match a substring of a path segment.