Here's my firebase.json. I'm trying redirect /sitemaps to a dynamically generated sitemaps in Firebase Storage. Unfortunately rewrites wildcard for the rest of routes overwrites the redirection. How would be the best way to specify to rewrite everything but that one url?
"redirects": [
{
"source" : "/sitemaps",
"destination" : "https://firebasestorage.googleapis.com/v0/b/foo",
"type" : 301
}
],
"rewrites": [
{
"source": "**",
"function": "bar"
}
]
one can negate the condition with a !
, in order to exclude.
"rewrites": [{
"source": "!/sitemaps",
"destination": "/index.html"
}, {
"source": "**",
"destination": "/index.html"
}]