聊聊dubbo-go-proxy的replacePathFilter
2021-02-08
阅读 2 分钟
1.7kreplacePathFilter定义了path属性;它实现了Filter的Do方法,该方法执行的是doReplacePathFilter方法,它会往header写入名为ReplacedPathHeader,若req.URL.RawPath为空则取req.URL.Path;之后将req.URL.RawPath更新为f.path,再通过url.PathUnescape(req.URL.RawPath)计算req.URL.Path,最后将req.URL.RequestURI()赋值...