6.0.1
Mac (Mojave)
const functions = require('firebase-functions');
exports.here = functions.https.onRequest((res) => res.ok());
exports.there = functions.region('asia-northeast1').https.onRequest((res) => res.ok());
firebase serve --only functions
creates the following endpoints
✔ functions: there: http://localhost:5000/my-project/us-central1/there
✔ functions: here: http://localhost:5000/my-project/us-central1/here
Both of them contains us-central1
I'm expecting that one of them contains asia-northeast1 instead of us-central1 in the path.
It's not a big deal but it got me confused, I wasn't sure multi region was actually working until I eventually deployed the functions.
Once deployed to production the function name contains asia-northeast1.
I see it as a very low priority, I don't mind if you guys want to close it as won't fix but I just wanted to leave a record of it for others that might be confused.
Personally, I think you're right. If you have a region specified, maybe we should be using that region in the URL.
I've made an internal bug and brought it up with the right people, I'll follow up after that discussion.
Internal tracking number: 119670123
Looks like it is hardcoded here: https://github.com/firebase/firebase-tools/blob/40afb70e9626efe526e46697f9847d1a92c47e06/src/hosting/functionsProxy.ts#L56
any updates on this?
This is a bug and we are tracking it, but there are no updates yet.
This bug was fixed when we released the new functions emulator backend. When supplying a region, it will now be in the URL like http://localhost:5000/project_id/asia-northeast1/helloWorld