Amazon S3 响应未 return 日期 header
Amazon S3 response does not return date header
我已经编写了一个从 S3 获取静态文件的 js SDK:
fetch(new Request("https://url.to.my.S3.file.js")).then((response) => {
//logging the response headers
response.headers.forEach((val,key)=>{
console.log(key,' = ',val)})
})
记录 header 时我只得到
content-type = application/javascript
last-modified = Mon, 22 Oct 2018 08:00:35 GMT
我遗漏了日期 header,它在我的本地服务器上可用。
如何配置我的 S3 存储桶以便 header 日期可用?
我的问题是我试图从不同的域获取资源。我确实将 <CORSConfiguration>
添加到我的 S3 存储桶,但缺少 <ExposeHeader>
节点。
添加后,如seen here,一切正常。
我已经编写了一个从 S3 获取静态文件的 js SDK:
fetch(new Request("https://url.to.my.S3.file.js")).then((response) => {
//logging the response headers
response.headers.forEach((val,key)=>{
console.log(key,' = ',val)})
})
记录 header 时我只得到
content-type = application/javascript
last-modified = Mon, 22 Oct 2018 08:00:35 GMT
我遗漏了日期 header,它在我的本地服务器上可用。
如何配置我的 S3 存储桶以便 header 日期可用?
我的问题是我试图从不同的域获取资源。我确实将 <CORSConfiguration>
添加到我的 S3 存储桶,但缺少 <ExposeHeader>
节点。
添加后,如seen here,一切正常。