使用CloudFlare来CDN一个Google Cloud Storage Bucket [英] Use CloudFlare to CDN a Google Cloud Storage Bucket

查看:109
本文介绍了使用CloudFlare来CDN一个Google Cloud Storage Bucket的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说过有关Cloudflare的许多好处,并且它们具有出色的CDN产品,其功能具有竞争对手所没有的功能(HTTP2,IPv6等)。

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在Google Cloud Storage存储桶中有文件。

I have files in a Google Cloud Storage bucket.

如何将这些文件设置为Cloudflare CDN的来源?

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

(Cloudflare控制面板似乎只想在根域上使用网站...?)

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

推荐答案

也许有点迟了,但我提出了我的答案,以防万一它对希望做同样事情的其他人有用。

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

我在CloudFlare后面有一个Google Cloud Storage存储桶。您只需要按照此处的说明进行操作即可:

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

在CloudFlare中,您需要管理根域,但是您可以创建它专门为您的Google Cloud Storage存储桶创建的子域(不要忘记在该子域上启用CloudFlare功能)。我认为这是CloudFlare运作的方式,可以管理您的根域,但我认为您无法避免。

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.

如果您需要为存储桶中使用的子域设置特定设置,您可以在CloudFlare中使用页面规则。例如,我必须使用它们,因为Google Cloud Storage不支持SSL,但是我使用这些静态文件的页面都在SSL上,因此我对该子域进行了特定设置以使用灵活的SSL。

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.

这篇关于使用CloudFlare来CDN一个Google Cloud Storage Bucket的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆