Custom Domain-Google Cloud function with HTTP triggers

Viewed 747

So we have made a google cloud function with an HTTP trigger. My aim is not to include firebase in this project.

How can I use my custom domain to connect to google cloud function using cloud DNS or something equivalent?

I already tried using a CNAME record but it didn't work as expected.

The Aim is to avoid CROS when we invoke it using Javascript/JQuery.

Thanks in advance.

2 Answers

The only way to map a custom domain to your HTTP/S triggered Cloud Functions is by using Firebase Hosting. There is no way to do so without using Firebase.

I belive @Frank is right, the way to go here is to use Firebase. But to improve GCP product or to have this feature in future, I would recommend creating a feature requests to support CNAME, you can create it under Compute --> Create new Cloud Functions issue or you could pick any of the more relevant link

Related