diff --git a/.beagle.yml b/.beagle.yml index c96f3a9a711c4e964e0e414d52961420356648ae..cb29a052700931b78f886eeb0c089929f2c93d0f 100644 --- a/.beagle.yml +++ b/.beagle.yml @@ -50,7 +50,7 @@ steps: base: registry.cn-qingdao.aliyuncs.com/wod/alpine-glibc:3.12 dockerfile: .beagle/dockerfile repo: gzgajzapi/apaas-meshproxy - Version: "v3.0.7" + Version: "v3.0.8" channel: alpha args: "TARGETOS=linux,TARGETARCH=amd64" registry: hub.wodcloud.com @@ -87,8 +87,8 @@ steps: REGISTRY_PASSWORD: from_secret: REGISTRY_PASSWORD settings: - source: hub.wodcloud.com/gzgajzapi/apaas-meshproxy:v3.0.7-alpha - target: hub.wodcloud.com/gzgajzapi/apaas-meshproxy:v3.0.7 + source: hub.wodcloud.com/gzgajzapi/apaas-meshproxy:v3.0.8-alpha + target: hub.wodcloud.com/gzgajzapi/apaas-meshproxy:v3.0.8 registry: hub.wodcloud.com --- diff --git a/src/handler/proxyhandler.go b/src/handler/proxyhandler.go index 791222301ae5a44cf4d34e963ed58450a630a302..8b3b970d70f5aa3bc3aacdf397a703a7f05aad1b 100644 --- a/src/handler/proxyhandler.go +++ b/src/handler/proxyhandler.go @@ -80,14 +80,14 @@ func Proxy(c *gin.Context) { requestStartTime := FormatDateToCarbon(proxyData.RequestStartTime) requestEndTime := FormatDateToCarbon(proxyData.RequestEndTime) - now := carbon.Now(carbon.Shanghai) - if requestStartTime.Gt(now) { + today := carbon.Parse(carbon.Now().ToDateString(), carbon.Shanghai) + if requestStartTime.Gt(today) { res := model.WebRes{} res.ErrMsg = `申请使用期限未开始` c.JSON(200, res) return } - if requestEndTime.Lt(now) { + if requestEndTime.Lt(today) { res := model.WebRes{} res.ErrMsg = `申请使用期限已过期` c.JSON(200, res)