From 851d04e56a77c2e729f3d9385271e82db777f8a6 Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 18 Jan 2019 16:50:31 +0800 Subject: [PATCH] modify gin setting --- router/routes/routes.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/router/routes/routes.go b/router/routes/routes.go index 6f010f6..5f64435 100644 --- a/router/routes/routes.go +++ b/router/routes/routes.go @@ -11,7 +11,7 @@ var r *gin.Engine // NewEngine - new gin engine func NewEngine() *gin.Engine { r = gin.Default() - + r.RedirectTrailingSlash = true return r } @@ -22,6 +22,5 @@ func SetRoutes(r *gin.Engine) { }) r.POST("/line", context.PatchCtx(line.GetRawBody), context.PatchCtx(line.VerifyLine), context.PatchCtx(line.LineWebhook)) - r.POST("/line/", context.PatchCtx(line.GetRawBody), context.PatchCtx(line.VerifyLine), context.PatchCtx(line.LineWebhook)) }