API Gateway HTTP API 代理集成会重新编码查询参数。

0

【以下的问题经过翻译处理】 你好,

这是我的配置: mydomain.com -> API GW自定义域 -> HTTP API -> 路由(/api/{+proxy}) -> VPCLink -> ALB -> HTTPS监听器 -> TargetGroup (Type: Instance) -> ECS Fargate Service

我们的前端客户端将一个数组作为查询参数发送,但API GW对参数进行编码,导致Fargate应用程序无法处理参数。 例如,假设客户端发出此请求:https://mydomain.com/hello/world?key=value1,value2,value3 在后端捕获的请求为:https://mydomain.com/hello/world?key=value1%2Cvalue2%2Cvalue3

如何防止这种行为?有没有任何方法?

谢谢。

1 Answer
0

【以下的回答经过翻译处理】 我们通过在后端应用程序上解码参数来解决了问题。由于API Gateway,针对这个特定问题没有配置选项。

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions