Javascript AmazonS3响应不返回日期标头
我编写了一个js SDK,它从S3获取一个静态文件:Javascript AmazonS3响应不返回日期标头,javascript,amazon-web-services,amazon-s3,response-headers,Javascript,Amazon Web Services,Amazon S3,Response Headers,我编写了一个js SDK,它从S3获取一个静态文件: 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)}) }) 当记录标题时,我只得到 content-type
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)})
})
当记录标题时,我只得到
content-type = application/javascript
last-modified = Mon, 22 Oct 2018 08:00:35 GMT
我缺少在本地服务器上可用的日期标头。如何配置S3存储桶以使日期头可用?我的问题是我试图从其他域获取资源。我确实将
添加到我的S3存储桶中,但缺少
节点
添加它之后,一切正常。你能给出一个实际的工作URL吗?对不起,我不能。