From 9760f193cd6b68bc35a89add3819f3f6d5e190d0 Mon Sep 17 00:00:00 2001 From: zyd Date: Wed, 24 Jun 2020 16:53:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .beagle.yml | 2 +- src/handler/proxyhandler.go | 2 +- src/router/router.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.beagle.yml b/.beagle.yml index cd35cbd..83a70f2 100644 --- a/.beagle.yml +++ b/.beagle.yml @@ -22,7 +22,7 @@ pipeline: - /var/run/docker.sock:/var/run/docker.sock base: registry.cn-qingdao.aliyuncs.com/wod/alpine-glibc:3.8 repo: apaas/apaas-meshproxy - version: 3.0.3 + version: 3.0.4 channel: alpha registry: hub.wodcloud.com secrets: diff --git a/src/handler/proxyhandler.go b/src/handler/proxyhandler.go index d1af467..008062f 100644 --- a/src/handler/proxyhandler.go +++ b/src/handler/proxyhandler.go @@ -17,7 +17,7 @@ import ( var Resp *http.Response func Proxy(c *gin.Context) { - applyId := c.Query("applyId") + applyId := c.Param("applyId") if applyId == "" { res := model.WebRes{} res.Data = "applyId不能为空" diff --git a/src/router/router.go b/src/router/router.go index 4c45433..44e1dfe 100644 --- a/src/router/router.go +++ b/src/router/router.go @@ -31,7 +31,7 @@ func Load(middleware ...gin.HandlerFunc) http.Handler { e.Use(middleware...) root := e.Group(config.Prefix) { - root.Any("/proxy", handler.Proxy) + root.Any("/:svcId/:applyId", handler.Proxy) } e.GET("/health", handler.Health) return e -- 2.26.0