xiongwilee / Gracejs

A Nodejs BFF framework, build with koa2(基于koa2的标准前后端分离框架)
https://grace.wilee.me
MIT License
1.39k stars 238 forks source link

修复Bug proxy代理的url并没有先对query进行url序列化 #29

Closed evanzlj closed 7 years ago

evanzlj commented 7 years ago

在具体业务中,service-api:/mobile/v1/submit?uid=123&time=1993-2-3 10:00─11:00 无法正确识别符号 ─ 导致proxy的url解析出现问题 无法发出Request请求 目前在业务中对每个query进行了 encodeURLComponent() 在拼接发送

xiongwilee commented 7 years ago

下面的querystring.stringify 会自动做urlencode ,为啥还要转一层呢?

xiongwilee commented 7 years ago

知道怎么回事儿了,是你的参数里有冒号;你得在拼URL的时候把那个时间给URLencode下

xiongwilee commented 7 years ago

现在proxy的方案优化了,你可以看看