将 Cloudflare CDN + HTTPS 与 Google 云存储一起使用

Using Cloudflare CDN + HTTPS with Google Cloud Storage

我正在尝试弄清楚如何让我的 Google Cloud Storage 存储桶与 Cloudflare 一起使用。我按照此处 https://cloud.google.com/storage/docs/static-website 的步骤进行了以下操作:

  1. 为我想要提供内容的位置添加了一个 cname 记录:cdn.test.stellarguard.me -> c.storage.googleapis.com

  2. 为cdn.test.stellarguard.me

  3. 添加了云存储桶
  4. 上传了一个文件并制作了 public: https://storage.googleapis.com/cdn.test.stellarguard.me/logo.svg

然而,当我去 https://cdn.test.stellarguard.me/logo.svg I see an error that there’s an SSL version mismatch. This is probably because of what is mentioned here (https://cloud.google.com/storage/docs/static-website#https):

While you can serve your content through HTTPS using direct URI’s such as , when hosting a static website using a CNAME redirect, Cloud Storage only supports HTTP. To serve your content through a custom domain over SSL, set up a load balancer, use a third-party Content Delivery Network with Cloud Storage, or serve your static website content from Firebase Hosting instead of Cloud Storage.

所以我做了一些搜索,看到有人建议打开 Flexible SSL (),所以我添加了一个页面规则:

*cdn.test.stellarguard.me/* - SSL - 灵活

但是,错误仍然存​​在。有什么想法吗?

我的问题与 Google Cloud Storage https 无关——问题是 CloudFlare free 不支持多个子域。将其切换为 cdn-test。stellarguard.me 有效。