Full repo: https://github.com/jmsherry/firebase-full
firebase.json
{
"hosting": {
"predeploy": [
"npm --prefix webapp run build"
],
"public": "webapp/build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "/server-time",
"function": "serverTime"
},
{
"source": "**",
"destination": "/index.html"
}
]
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
}
}
I'm trying to my functions to work with hosting. The function is available (url: https://europe-west2-full-firebase-efc5a.cloudfunctions.net/serverTime) but The re-write for the server-time function works locally but when running on firebase hosting it 404s and redirects to the homepage (url: https://full-firebase-efc5a.firebaseapp.com/server-time)
It's like it's not being sent through to the function on firebase's end!
Can anyone shed any light?