自定义404页的S3临时标识的URL缺少的对象 [英] custom 404 page for missing object in s3 temporary signed URL

查看:140
本文介绍了自定义404页的S3临时标识的URL缺少的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我生成,某些已经签署的URL在亚马逊S3

I am generating some signed URL's for some private information in Amazon S3

在的情况下签署的链接已失效,或者该对象不存在,存在是报告XML错误,以及一个404错误(或403禁止)。

In the case that the signed link has expired, or that the object doesn't exist there is an XML error that is reported, along with a 404 error (or 403 forbidden).

是否有可能重定向签署链接404自定义错误页?这似乎不同了S3的静态网站设置的404错误页面。

Is it possible to redirect the signed link 404 to a custom error page? This seems different to the 404 error page for the S3 static website settings.

我的研究,到目前为止已表示,如果使用静态页面,权限必须是公开可读的所有内容,你不能生成签名的URL(或我做错了),或者如果您使用的是标识的URL 404错误不会重定向,你刚刚得到的XML错误。

My research so far has indicated that if you use the static pages, the permissions have to be publicly readable for all content and you cannot generate the signed URL (or I'm doing it wrong) OR if you use a signed URL the 404 error doesn't redirect and you just get the XML error.

所有的链接我已经找到点使用静态页面,但我不认为适用于这种情况。

all the links i have found point to use the static pages but I don't think that applies in this case.

推荐答案

这可能是你想要的是这样的: 在开发者指南有一个关于自定义一个段落错误文档支持在那里我读到下面的句子。

It is possible that what you want is this: In the Developer guide there is a paragraph about "Custom Error Document Support" where I read the following sentence.

您可以选择性地提供自定义错误文档与   用户友好的错误消息和其他帮助。你提供这样的   自定义错误文档中添加网站配置的一部分,你的   桶。亚马逊S3返回您的自定义错误文档仅用于HTTP   4XX类C $ CS错误$的。

You can optionally provide a custom error document with a user-friendly error message and with additional help. You provide this custom error document as part of adding website configuration to your bucket. Amazon S3 returns your custom error document for only the HTTP 4XX class of error codes.

这篇关于自定义404页的S3临时标识的URL缺少的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆