CloudFront 加载文本时出现问题,而不是显示 html
我正在使用具有以下策略的 CloudFront。
缓存策略:禁用
源请求策略:
cookies_config {
cookie_behavior = "all"
}
headers_config {
header_behavior = "whitelist"
headers {
items = ["Host", "Accept-language]
}
}
query_strings_config {
query_string_behavior = "all"
}
但问题是在网站的其中一个部分显示 HTML 而不是文本/设计。
预期结果
实际结果
I am using CloudFront with the following policies.
Cache Policy: Disable
Origin Request Policy:
cookies_config {
cookie_behavior = "all"
}
headers_config {
header_behavior = "whitelist"
headers {
items = ["Host", "Accept-language]
}
}
query_strings_config {
query_string_behavior = "all"
}
But the problem is that in one of the section of website showing HTML instead of text/design.
Expected Result
Actual Result
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题出在 CloudFront 的原始请求策略中,缺少一些我无法找到特定的标头,因此将标头设置为 AllViwers,它显示了预期的结果。
原产地请求政策
The issue was in the origin request policy of CloudFront, missing some header which I wasn't able to find specific, so putting header as AllViwers, it is showing the expected result.
Origin Request Policy