Ad

Firebase Uses Cloudfunctions.net Instead Of Hosting Rewrites Rules

- 1 answer

I have set up rewrites for named functions in firebase.json but still firebase.functions().httpsCallable() envokes [my-server].cloudfunctions.net/[function-name] instead of [my-server].com/

I am upgrading a current project that has been working fine with cloudfunctions.net, but I would like to limit the domain names being called because of some firewalls blocking that domain. Reading the guide if thought this addition in firebase.json would be sufficient:

"rewrites": [
      {
        "source": "/getResponse",
        "function": "getResponse"
      }]

and then calling the function from my app with:

firebase.functions().httpsCallable('getResponse')

...But that envokes [my-server].cloudfunctions.net/getResponse instead of [my-server].com/getResponse

Opening [my-server].com/getResponse in my browser works, so I figure, there is some sort of explicit setting on firebase.functions() where I can force it to use custom domain?

Thanks you for any help

Ad

Answer

There is no way to configure the Firebase client SDK for callable functions to invoke anything other than the default URL for the function. If this is somehow important to you, you are free to file a feature request.

Ad
source: stackoverflow.com
Ad