【发布时间】:2018-09-20 13:54:49
【问题描述】:
我正在尝试弄清楚如何让我的 Google Cloud Storage 存储桶与 Cloudflare 一起使用。我按照https://cloud.google.com/storage/docs/static-website 此处的步骤进行了以下操作:
添加了一条 cname 记录,用于记录我想在哪里提供我的内容:cdn.test.stellarguard.me -> c.storage.googleapis.com
为 cdn.test.stellarguard.me 添加了云存储桶
上传文件并公开:https://storage.googleapis.com/cdn.test.stellarguard.me/logo.svg
但是,当我转到 https://cdn.test.stellarguard.me/logo.svg 时,我看到了 SSL 版本不匹配的错误。这可能是因为这里提到的(https://cloud.google.com/storage/docs/static-website#https):
虽然您可以通过 HTTPS 使用直接 URI 来提供您的内容,例如 如,当使用 CNAME 重定向托管静态网站时,云 存储仅支持 HTTP。通过自定义服务您的内容 通过 SSL 的域,设置负载均衡器,使用第三方内容 带有云存储的交付网络,或为您的静态网站提供服务 来自 Firebase 托管而不是云存储的内容。
于是我搜索了一下,看到有人建议开启 Flexible SSL (Use CloudFlare to CDN a Google Cloud Storage Bucket),所以我添加了一个 Page Rule:
*cdn.test.stellarguard.me/* - SSL - 灵活
但是,错误仍然存在。有什么想法吗?
【问题讨论】:
标签: google-cloud-storage cloudflare