如何确保存储桶中的文件在我的网站上以 gzip 压缩格式提供?
How can I make sure files in a Storage Bucket are being served gzipped on my website?
我在 Google Cloud Platform 中为我的网站设置了这样的一个 Gatsbyjs 项目:
- 推送到存储库
- 触发 CloudBuild 将我的 Gatsby 网站构建到 public 文件夹中
- 使用 rsync
将“public”文件夹中的文件复制到存储桶
但是,当我访问我的站点(LoadBalancer 连接到存储桶)时,.js、.css、.html 文件未作为 gzip 提供。
我知道 gzip 的 cp
命令上似乎有一个标志,但这对 rsync
是如何工作的?
谢谢
我在 Google Cloud Platform 中为我的网站设置了这样的一个 Gatsbyjs 项目:
- 推送到存储库
- 触发 CloudBuild 将我的 Gatsby 网站构建到 public 文件夹中
- 使用 rsync 将“public”文件夹中的文件复制到存储桶
但是,当我访问我的站点(LoadBalancer 连接到存储桶)时,.js、.css、.html 文件未作为 gzip 提供。
我知道 gzip 的 cp
命令上似乎有一个标志,但这对 rsync
是如何工作的?
谢谢