3

I have a custom domain (cdnexample.com) and a Firebase Google Cloud Storage Bucket (examplefiles.appspot.com). I want to configure cdnexample.com domain in Cloudflare CDN to source from GCS bucket (examplefiles.appspot.com).

For example, given a GCS File: https://storage.googleapis.com/examplefiles.appspot.com/image1.jpg I want to get the Cloudflare CDN File working: https://cdnexample.com/image1.jpg

The problem is that I cannot change the GCS bucket name (examplefiles.appspot.com) to match my Cloudflare domain name (cdnexample.com). All the solutions I came across below require the GCS bucket name to match Cloudflare domain name and use CNAME configuration with c.storage.googleapis.com.

I have read through the following relevant articles:

Does anyone have an idea of how to make the Cloudflare CDN work in this case?

David Liu
  • 952
  • 7
  • 15
  • 1
    1) Create a new bucket and move the files. 2) Create an Google HTTPS load balancer with a custom domain. – John Hanley Dec 10 '20 at 20:36
  • Thanks John. I would love to go with 2) approach with load balancer. Do you mind providing more details? – David Liu Dec 11 '20 at 01:31
  • Let me know if this helps get you started: https://cloud.google.com/load-balancing/docs/https/ext-load-balancer-backend-buckets – John Hanley Dec 11 '20 at 01:32
  • Thanks John! - Should the custom domain in load balance be the same as the Cloudflare domain? - Should I also enable Google Cloud CDN as well? – David Liu Dec 11 '20 at 01:35
  • Review this link: https://cloud.google.com/network-connectivity/docs/cdn-interconnect – John Hanley Dec 11 '20 at 02:06

1 Answers1

0

In this case you can set up a load balancer with backend bucket which will connect your storage bucket and can be accessed with an IP address, later you point the IP address in your custom domain. you can find the below information about adding a backend bucket here

Akshoy
  • 177
  • 1
  • 4