浏览器中的AWS API Gateway ERR_CONTENT_DECODING_FAILED [英] AWS API Gateway ERR_CONTENT_DECODING_FAILED in browser
问题描述
In my use case, API Gateway serves as an HTTP proxy, using default settings following official tutorial.
已通过测试控制台或通过curl进行了测试.但是,如果我在浏览器中访问该链接或进行AJAX调用,则会得到ERR_CONTENT_DECODING_FAILED
.
It's tested working in test console or via curl. But if I access the link in browser or make an AJAX call, I'll get ERR_CONTENT_DECODING_FAILED
.
似乎API Gateway破坏了内容. 相关问题.
It seems that API Gateway corrupt the content. Related issue.
有没有一种方法可以禁止API网关更改我的内容?我将Content Handling
设置为passthrough
,但显然它正在更改我的内容.
Is there a way to forbid API Gateway changing my content? I set Content Handling
to passthrough
, but clearly it's changing my content.
推荐答案
添加具有值'identity'
的静态集成请求标头Accept-Encoding
,以便AWS不会篡改您的请求.
Add a static integration request header Accept-Encoding
with value 'identity'
, so that AWS won't tamper your request.
这篇关于浏览器中的AWS API Gateway ERR_CONTENT_DECODING_FAILED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!