Was briefly mentioned here , but right now I'm at the point where I've connected my GCP project to Firebase, set up a custom domain under Firebase hosting, but on the functions page of the Firebase dashboard, there doesn't seem to be a way to set the vanity URL on a cloud function.
My firebase.json (at the root of my project) looks like :
{
"hosting": {
"public": "public",
"rewrites": [
{ "source": "/helloWorld", "function": "helloWorld" },
{ "source": "/progress", "function": "progress" }
]
}
}
To associate a vanity domain with your Cloud Functions, you need to associate them with Firebase Hosting. See the documentation on connecting the two .
Say you have a Cloud Function https://us-central1-<your-project-id>.cloudfunctions.net/bigben
.
After making this connection the function will also be available on https://<your-project-id>.firebaseapp.com/bigben
.
If you also connect a custom domain with Firebase Hosting, the function will also be available on https://<your-custom-domain>.com/bigben
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.