Use CloudFlare to CDN a Google Cloud Storage Bucket

笑着哭i 提交于 2019-12-07 04:37:42

问题


I've heard many good things about Cloudflare, and they have an excellent CDN product that features functionality not found on competitors (HTTP2, IPv6 etc).

I have files in a Google Cloud Storage bucket.

How to set these files as the origin for a Cloudflare CDN?

(The Cloudflare control panel seems to just want a website on a root domain...?)


回答1:


Maybe a bit late, but I put my answer just in case it is useful for someone else looking to do the same thing.

I have a bucket in Google Cloud Storage behind CloudFlare. You just need to follow the instructions here:

https://cloud.google.com/storage/docs/website-configuration

In CloudFlare you will need to manage your root domain, but then you can create a subdomain just for your bucket in Google Cloud Storage (don't forget to enable CloudFlare features on that subdomain). I think that's the way CloudFlare works, managing your root domain and I don't think you can avoid it.

If you need specific settings for the subdomain used for your bucket, you can use page rules in CloudFlare. For example, I had to use them because Google Cloud Storage does not support SSL but my pages using those static files were on SSL, so I had specific settings for that subdomain to use flexible SSL.



来源:https://stackoverflow.com/questions/35116278/use-cloudflare-to-cdn-a-google-cloud-storage-bucket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!