本文介绍了将Cloudflare CDN + HTTPS与Google Cloud Storage结合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I’m trying to figure out how to get my Google Cloud Storage bucket to work with Cloudflare. I followed the steps here https://cloud.google.com/storage/docs/static-website and did the following:

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

  1. Added a cname record for where I want to serve my content: cdn.test.stellarguard.me -> c.storage.googleapis.com

为cdn.test.stellarguard.me添加了云存储桶

Added a cloud storage bucket for cdn.test.stellarguard.me

上传文件并将其公开: https://storage.googleapis.com/cdn.test.stellarguard.me/logo.svg

Uploaded a file and made it public: 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 ):

However, when I go to 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):

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

So I did a little searching and saw someone suggested turning on Flexible SSL (Use CloudFlare to CDN a Google Cloud Storage Bucket), so I added a Page Rule:

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

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

However, the error still persists. Any ideas?

推荐答案

我的问题与Google Cloud Storage https没有关系-问题是免费的CloudFlare不支持多个子域.将其切换到cdn-test.stellarguard.me即可.

My issue had nothing to do with Google Cloud Storage https -- the issue was that CloudFlare free does not support more than one subdomain. Switching it to cdn-test.stellarguard.me worked.

这篇关于将Cloudflare CDN + HTTPS与Google Cloud Storage结合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 10:50