I’m trying to configure the rules for firebase storage.
mainly to add access for appgyver preview.
this is the current script version:
rules_version = ‘2’;
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth != null;
// Add CORS configuration for web access
allow origin: if request.method == "OPTIONS" || request.method == "GET"
|| request.method == "HEAD"
|| request.method == "POST"
&& request.headers.origin == "https://preview.appgyver.com";
}
// Add access for iOS and Android app stores
match /{allPaths=**} {
allow read: if request.auth == null && request.resource.contentType.matches('image/.*');
}
}
}
Can some one help me fix this, also help if I’m missing anything, etc. I’m not familiar at all with doing this. Thank you