I want to rewrites all URL end with "api/(funcName)" to call cloud function (funcName).
In firebase.json I set rewrites rules as follows.
"rewrites": [
{
"source": "api/:funcName",
"function": ":funcName"
},
{
"source": "**",
"destination": "/index.html"
}
]
but it's not working.
I got
Error: Forbidden
Your client does not have permission to get URL /:funcName/api/(funcName) from this server.
(funcName) is the real function name I don't want to show here.
:funcName, there is nothing to do with the function itself. Just I don't want to set 100 rewrite entries if I have 100 functions, so I'm looking for some easy ways like the code I proposed, which doesn't work.