google-cloud-storage - GoogleCloudStorage 重定向到另一个域
问题描述
提前感谢您的回答我想让谷歌云存储链接(storage.googleapis.com)重定向到我自己的域到目前为止我已经实现了这一点,但是当我添加一些类似图片的东西时,它托管在我的一个服务器中链接到这个域的谷歌云存储链接不能正常工作,解释:
例如我的域名example.com
,如果我在此之后添加任何内容,例如https://storage.googleapis.com /example-test/example.html#gOAdv.png它只重定向到主域example.com
这是我的内容example.html
:
<meta http-equiv="refresh"content="0; url=http://myexampledomain.com/">
请注意,当我从链接 ( https://storage.googleapis.com/example-test/example.html#gOAdv.png ) 中删除 # 时,它会显示此错误:
此 XML 文件似乎没有任何与之关联的样式信息。文档树如下所示。
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Details>No such object: example-test/example.html/gOAdv.png</Details>
</Error>
解决方案
大家好,我找到了答案,这是我的想法
<meta http-equiv="refresh"content="0; url=http://myexampledomain.com/">
这条线很短而且很糟糕,我需要通过另一种语言对其进行编码才能使其工作。谢谢大家。
推荐阅读
- java - 如何在spring legacy环境下正常运行junit test?
- google-drive-api - 在 Google Drive API v3 中获取上一页令牌
- python - 如何在云中运行 Jupiter 服务器让学生进行测试并提交答案?
- python - Numpy - 创建整数索引矩阵的最快方法
- azure - Azure Frontdoor - 如何隐藏后端 url 地址?
- mongodb - 为什么 express/mongodb updateOne post 允许 $set 某些值,但不会更新其他值?
- javascript - 如何在反应中为 UI 设置动画?
- python - 在python中扫描Mac上的目录时出现问题
- node.js - Stripe API无法自动扣款如何处理(Stripe API key)
- haskell - 如何打印出二维数组haskell