Reputation: 663
For example, I have https://REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/myfunctionname
But I want to have a root link to my function. Something like that:
https://myfunctionname.REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/
How can I get this?
Upvotes: 2
Views: 1986
Reputation: 317712
You can't change the URL provided by Cloud Functions, but you can use Firebase Hosting as a proxy to Cloud Functions so you can use a custom domain to access functions deployed to the same project.
https://firebase.google.com/docs/hosting/functions
Upvotes: 4
Reputation: 1547
Currently there is no way to get a different URL from a Cloud Function other than the one automatically generated which will always have the format "https://REGION-PROJECT_ID.cloudfunctions.net/hello_get".
If there was a way to do this, it would need to be defined during ht deployment of the function, and according to the documentation for 'gcloud function deploy', there is no way to specify a way to change the URL generated.
Upvotes: 1