google-app-engine - 谷歌云平台存储错误 : "Locked Domain Expired" when trying to access my storage items

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

我目前在谷歌云平台存储桶中为我的网站托管一些静态 .css、.js、.tff 和图像资源。上传这些资源后,我最多可以访问这些资源大约 20 分钟。大约 20 分钟后,当我尝试访问它们时收到 401 错误消息:

{"error":{"errors":[{"domain":"global","reason":"lockedDomainExpired","message":"Locked Domain Expired"}],"code":401,"message":"Locked Domain Expired"}}

来自 GCP 网站:

lockedDomainExpired: When downloading content from a cookie-authenticated site, e.g., using the Storage Browser, the response will redirect to a temporary domain. This error will occur if access to said domain occurs after the domain expires. Issue the original request again, and receive a new redirect.

在我尝试使用 GCP 存储桶的背景下,我不太确定这意味着什么?任何帮助或资源将不胜感激。

最佳答案

当您在开发人员控制台中单击指向某个对象的链接时,它会生成一个仅在短时间内有效的 URL。我怀疑您是将此 URL 复制到您的网站,而不是使用可公开访问的 URL。

假设对象是公开可读的,您应该能够改用这种 URL 格式。

https://storage.googleapis.com/<bucket>/<object>

关于google-app-engine - 谷歌云平台存储错误 : "Locked Domain Expired" when trying to access my storage items,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45390150/

相关文章:

java - Google App Engine/Objectify 软删除

python - 从 App Engine 中的 URL Fetch 调用的 Google API 的 API key 限制

kubernetes - Google Cloud Platform(GCP)入口不正常的后端

python - 如何将腌制数据帧从 GCS 加载到 App Engine

ios - 云存储服务,什么,如何以及哪些?

google-app-engine - 如何禁用 `gcloud preview app run` 的健康检查

google-app-engine - 使用 golang 调试 App 引擎——一定有更好的方法吗?

java - 如何从 GAE Java 通过代理发送基本的 HTTP GET?

macos - keystore 密码?啊?

amazon-web-services - 运行小型 kubernetes cronjob 的成本?