浏览器中的AWS API Gateway ERR_CONTENT_DECODING_FAILED [英] AWS API Gateway ERR_CONTENT_DECODING_FAILED in browser

查看:89
本文介绍了浏览器中的AWS API Gateway ERR_CONTENT_DECODING_FAILED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的用例中,API网关用作HTTP代理,使用

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆