Amazon S3 上的自定义标头 [英] Custom headers on Amazon S3
问题描述
是否可以在 Amazon S3 上使用任意命名的自定义标头?
Is it possible to have custom headers on Amazon S3 with arbitrary naming?
例如,我使用指向 Amazon S3 作为源服务器的 CDN,为了在 CDN 上启用高级功能,我需要使用自定义标头 x-something-something
...
For example, I am using a CDN pointing to Amazon S3 as the origin server, and in order to enable advanced functionality on the CDN I need to use a custom header x-something-something
...
我认为使用 x-amz-meta-(something)
可以做到这一点,但是更通用的东西比如 x-(something)-(something)
没有 amz
?
I see it's possible to do this with x-amz-meta-(something)
but what about something more general like x-(something)-(something)
without the amz
?
推荐答案
我认为他们的 当前 API.它们涵盖了缓存和浏览器互操作性所需的主要标头.
I don't think it is possible with their current API. They cover the major headers you will need for caching and browser interoperability.
我认为他们只允许带有 x-amz-meta-
前缀的自定义标头是安全的,这可能是为了在将来更新他们的 api 时避免与用户选择的标头发生冲突.
I think they are being safe in only allowing x-amz-meta-
prefixed custom headers, possibly to keep from clashing with user selected headers when they update their api in the future.
如果您需要将自定义属性附加到您的对象,那么解析您的客户端应用程序中的 x-amz-meta-
应该很简单.
If you need custom attributes attached to your objects, it should be trivial to parse out the x-amz-meta-
in your client application.
这篇关于Amazon S3 上的自定义标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!