添加带有指向 Google 存储桶的自定义子域的 SSL App 引擎
Adding a SSL App engine with custom subdomain pointing to Google Storage bucket
当前应用:
- 自定义域上的 Goole App Engine:
myapp.com
- Google 自定义子域上的 Cloud Storage 存储桶(它使用 DNS):
images.myapp.com
- 我有
images
子域的 SSL 证书
我的问题是:是否可以使用 SSL 进行此配置?
我尝试过的事情:
- 负载平衡器。我不知道如何将不是
/images/*
的所有内容重定向到 GAE(它似乎只适用于后端)
dispatch.yaml
。我认为它仅适用于您部署的服务
- 我在 App Engine 设置 中添加了
images.myapp.com
,但是由于 images.myapp.com
的重定向是在 DNS 级别完成的,安全层丢失了
我们非常欢迎任何建议或想法。
谢谢!
该限制来自在自定义域下显示为网站的云存储存储桶 - 您不能对其使用 SSL。来自 You want your content served through HTTPS:
SSL is not currently supported by the Cloud Storage webservers; thus,
you can only use a CNAME redirect with HTTP and not with HTTPS. If you
wish to serve content through HTTPS from your bucket, we recommend you
use a third-party Content Delivery Network with Cloud Storage.
Alternatively, you can serve your static website content from
Firebase Hosting instead of Google Cloud Storage.
如果您网站的内容满足 Code and static data storage 配额,您可以通过 GAE 作为静态内容(通过 google CDN)为您的网站提供服务,它可以映射到自定义域,并且使用 SSL。参见:
如果您的内容超出了上述配额,那么您仍然可以通过您的应用程序提供它,但是动态地,您的应用程序可以访问存储在 GCS 上的内容并提供它 - 更昂贵,因为您将为其使用实例小时数.
当前应用:
- 自定义域上的 Goole App Engine:
myapp.com
- Google 自定义子域上的 Cloud Storage 存储桶(它使用 DNS):
images.myapp.com
- 我有
images
子域的 SSL 证书
我的问题是:是否可以使用 SSL 进行此配置?
我尝试过的事情:
- 负载平衡器。我不知道如何将不是
/images/*
的所有内容重定向到 GAE(它似乎只适用于后端) dispatch.yaml
。我认为它仅适用于您部署的服务- 我在 App Engine 设置 中添加了
images.myapp.com
,但是由于images.myapp.com
的重定向是在 DNS 级别完成的,安全层丢失了
我们非常欢迎任何建议或想法。
谢谢!
该限制来自在自定义域下显示为网站的云存储存储桶 - 您不能对其使用 SSL。来自 You want your content served through HTTPS:
SSL is not currently supported by the Cloud Storage webservers; thus, you can only use a CNAME redirect with HTTP and not with HTTPS. If you wish to serve content through HTTPS from your bucket, we recommend you use a third-party Content Delivery Network with Cloud Storage. Alternatively, you can serve your static website content from Firebase Hosting instead of Google Cloud Storage.
如果您网站的内容满足 Code and static data storage 配额,您可以通过 GAE 作为静态内容(通过 google CDN)为您的网站提供服务,它可以映射到自定义域,并且使用 SSL。参见:
如果您的内容超出了上述配额,那么您仍然可以通过您的应用程序提供它,但是动态地,您的应用程序可以访问存储在 GCS 上的内容并提供它 - 更昂贵,因为您将为其使用实例小时数.