I'm using Firebase functions v2 and I would like to use a custom domain name for HTTP calls. I already searched before posting but all answers are for Firebase functions v1.
Here is the function showed in the Firebase console:
https://-ltnwgqwdfq-uc.a.run.app
/>
And here is what I would like to achieve:
https://.my-domain.com
/>
Here is what I tried:
In firebase.json file
{
"hosting": {
"rewrites": [
{
"source": "/api/function-name",
"function": {
"functionId": "function-name"
},
{
"source": "!/@(api)/**",
"destination": "/index.html"
}
]
}
// [...]
I deployed only the hosting part and when I try to run the google cloud function it works well:
https://function-name-ltnwgqwdfq-uc.a.run.app
/>
But impossible to run the custom domain name function (it redirects me to a 404 HTML page):
https://my-domain.com/function-name
No comments:
Post a Comment
Thanks