google-cloud-platform - 云存储桶中的公共(public)对象无法通过负载均衡器访问

标签 google-cloud-platform google-cloud-storage google-cloud-cdn

我为我的 Google Cloud Storage 存储桶设置了 CDN。我已经上传了一个公共(public)对象,您可以通过此处的公共(public)链接查看它:https://storage.googleapis.com/staging.twinkle-4acfc.appspot.com/example_out_message_bg.9.png

因此,为了让 CDN 正常工作,请按照 this question 进行操作。 ,我需要通过负载均衡器访问存储桶。

好的,所以我设置了负载均衡器,此 URL 定向到存储桶,并且它是公共(public)对象,但响应包含 XML 访问错误。

http://130.211.26.19/stagemedia/example_out_message_bg.9.png

事实上,你可以改变任何路径,只要尝试/a,错误是一样的。负载均衡器设置是否不正确?

最佳答案

您的对象需要匹配整个路径,在本例中为“stagemedia/example_out_message_bg.9.png”。尝试使用整个名称创建一个对象,包括“stagemedia/”部分。

关于google-cloud-platform - 云存储桶中的公共(public)对象无法通过负载均衡器访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45289674/

相关文章:

google-app-engine - Ubuntu 12.04 上的 gcloud 安装权限问题

google-cloud-platform - 谷歌Oauth错误: 403 access_denied the developer has not given permission

google-app-engine - 如何从 Cloud Storage 存储桶提供 App Engine 网站/静态/目录内容?

encoding - CloudCDN是否支持Brotli编码的服务?

google-cloud-platform - GCP 顶点 - 获取已部署模型 ID 的直接方法

python - 无法从云函数正确访问GCS对象

google-cloud-storage - 在 Google Compute Engine 中按标签计费

reactjs - 使用相同的 GCP 负载均衡器在 GCS 存储桶和 GKE 之间进行路由

firebase - 警告 "It looks like you' 正在使用 Firebase JS SDK 的开发版本。”

python - Google Cloud Function - 函数加载错误 : File main. 预期定义函数的 py 不存在