I have a NextJS app and an express.js API both hosted in Firebase Cloud Functions.
This is my firebase.json
{
"hosting": {
"public": "src/public",
"rewrites": [
{
"source": "/user",
"function": "api"
},
{
"source": "/users",
"function": "api"
},
{
"source": "**/**",
"function": "next"
}
]
},
"functions": {
"source": "src/functions"
}
}
What I expecting was to rewrite /user and /users to api Cloud Function and all other URL to next Cloud Function. But it not working as I expected. Every URL is passing to next Cloud Function even /user and /users.
And I need help...