问题:S3静态托管URL服务于正确的html页面,但其他URL都没有正常工作。相反,他们将我的index.html作为文件通过Web浏览器下载。会在这里请求一些帮助,因为我已经尝试过在我的研究中找到的所有解决方案。
域:http://amber.fidento.com(通过CloudFlare)
S3静态网络托管网址:http://amber.fidento.com.s3-website-us-east-1.amazonaws.com
CloudFront分配网址:d35jbnkk7p2igl.cloudfront.net
在上述每个URL上使用curl -I,我在第1和第3个URL的输出上获得application / octet-stream,在第2个上获得text / html。
其他信息:
CORS配置:
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
广告管理政策:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::amber.fidento.com/*"
}
]
}
index.html将元数据设置为text / html