Commit f47f68e3 authored by gaoshiyao's avatar gaoshiyao

更新路由设置

parent 57bd8b3c
# 发布 # 发布
## go vendor
```bash
go mod init
go mod vendor
go mod tidy
```
# 单条服务 # 单条服务
PROXY_HOST=apaas.wodcloud.com PROXY_HOST=apaas.wodcloud.com
......
...@@ -42,9 +42,9 @@ func getProxyURL(req *http.Request) string { ...@@ -42,9 +42,9 @@ func getProxyURL(req *http.Request) string {
result = fmt.Sprintf("http://%s%s", config.ProxyHost, path) result = fmt.Sprintf("http://%s%s", config.ProxyHost, path)
} else { } else {
result = fmt.Sprintf("http://%s%s?%s", config.ProxyHost, path, rawQuery) result = fmt.Sprintf("http://%s%s?%s", config.ProxyHost, path, rawQuery)
} if strings.HasSuffix(result, "/") {
if strings.HasSuffix(result, "/") { result = strings.TrimRight(result, "/")
result = strings.TrimRight(result, "/") }
} }
return result return result
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment