AWS API Gateway ERR_CONTENT_DECODING_FAILED in browser

半城伤御伤魂 提交于 2019-11-28 12:39:28

问题


In my use case, API Gateway serves as an HTTP proxy, using default settings following official tutorial.

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.

It seems that API Gateway corrupt the content. Related issue.

Is there a way to forbid API Gateway changing my content? I set Content Handling to passthrough, but clearly it's changing my content.


回答1:


Add a static integration request header Accept-Encoding with value 'identity', so that AWS won't tamper your request.



来源:https://stackoverflow.com/questions/44815649/aws-api-gateway-err-content-decoding-failed-in-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!