Commit 9ca2b657 authored by CHENGHAO's avatar CHENGHAO

bug fix

parent dba06cf0
...@@ -30,7 +30,7 @@ pipeline: ...@@ -30,7 +30,7 @@ pipeline:
base: registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12 base: registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12
dockerfile: build/dockerfile dockerfile: build/dockerfile
repo: wod/apaas-meshproxy repo: wod/apaas-meshproxy
version: v3.0.2 version: v3.0.3
channel: alpha channel: alpha
args: "TARGETOS=linux,TARGETARCH=amd64" args: "TARGETOS=linux,TARGETARCH=amd64"
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
...@@ -47,8 +47,8 @@ pipeline: ...@@ -47,8 +47,8 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.2-alpha source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.3-alpha
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.2 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.3
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
- source: REGISTRY_USER_ALIYUN - source: REGISTRY_USER_ALIYUN
...@@ -63,7 +63,7 @@ pipeline: ...@@ -63,7 +63,7 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.2 source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.3
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
...@@ -83,7 +83,7 @@ pipeline: ...@@ -83,7 +83,7 @@ pipeline:
base: registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12-arm64 base: registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12-arm64
dockerfile: build/dockerfile dockerfile: build/dockerfile
repo: wod/apaas-meshproxy repo: wod/apaas-meshproxy
version: "v3.0.2" version: "v3.0.3"
channel: alpha-arm64 channel: alpha-arm64
args: "TARGETOS=linux,TARGETARCH=arm64" args: "TARGETOS=linux,TARGETARCH=arm64"
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
...@@ -100,8 +100,8 @@ pipeline: ...@@ -100,8 +100,8 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.2-alpha-arm64 source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.3-alpha-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.2-arm64 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.3-arm64
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
- source: REGISTRY_USER_ALIYUN - source: REGISTRY_USER_ALIYUN
...@@ -116,7 +116,7 @@ pipeline: ...@@ -116,7 +116,7 @@ pipeline:
dns: 223.5.5.5 dns: 223.5.5.5
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.2-arm64 source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.3-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0-arm64 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0-arm64
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
......
...@@ -177,10 +177,12 @@ func Proxy(c *gin.Context) { ...@@ -177,10 +177,12 @@ func Proxy(c *gin.Context) {
reqURL := testutils.ParseURI(proxyData.ReqUrl) reqURL := testutils.ParseURI(proxyData.ReqUrl)
fmt.Println(reqURL) fmt.Println(reqURL)
if reqURL.RawQuery == "" { if reqURL.RawQuery == "" {
reqURL.RawQuery = c.Request.URL.RawQuery //reqURL.RawQuery = c.Request.URL.RawQuery
reqURL.RawQuery = c.Request.URL.Query().Encode()
} else { } else {
if c.Request.URL.RawQuery != "" { if c.Request.URL.RawQuery != "" {
oldQ := c.Request.URL.Query() //oldQ := c.Request.URL.Query()
oldQ := reqURL.Query()
newQ := c.Request.URL.Query() newQ := c.Request.URL.Query()
for k, v := range newQ { for k, v := range newQ {
if len(v) > 1 { if len(v) > 1 {
...@@ -198,6 +200,8 @@ func Proxy(c *gin.Context) { ...@@ -198,6 +200,8 @@ func Proxy(c *gin.Context) {
} }
} }
reqURL.RawQuery = oldQ.Encode() reqURL.RawQuery = oldQ.Encode()
} else {
reqURL.RawQuery = reqURL.Query().Encode()
} }
} }
......
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