有没有办法在Google云端存储上托管整个网站?也就是说,将存储桶直接映射到顶级域.
例如,创建一个名为mysite.com的存储桶,然后当用户访问mysite.com直接从云存储中提供内容时?
我看到了如何CNAME使用子域名,例如静态 .mysite.com,但无法弄清楚如何将顶级域映射到存储桶.
有解决方案吗
我正在使用Google Cloud Storage为我的Google App Engine应用程序存储图像,而我正在尝试访问这些图像:
<img src="https://storage.googleapis.com/BUCKET_NAME/IMAGE_NAME">
Run Code Online (Sandbox Code Playgroud)
但是,这会显示"拒绝访问"或向我显示Google登录提示.然后我尝试使用签名URL授予客户端访问权限.
我生成了要签名的URL,如下所示:
String HTTP_Verb = "GET";
String Expiration = "1361993085";
String Canonicalized_Resource = "/bucket_name/sub_directory";
String stringToSign = HTTP_Verb + "\n" + Expiration + "\n" + Canonicalized_Resource;
Run Code Online (Sandbox Code Playgroud)
然后使用p12文件生成Base64并使用Java编译,但是我收到此错误:
The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.
Run Code Online (Sandbox Code Playgroud)
我在这做错了什么?有没有办法可以在没有身份验证的情况下从GCS访问图像?