modify gin setting

This commit is contained in:
Jay 2019-01-18 16:50:31 +08:00
parent ca453dd773
commit 851d04e56a

View File

@ -11,7 +11,7 @@ var r *gin.Engine
// NewEngine - new gin engine // NewEngine - new gin engine
func NewEngine() *gin.Engine { func NewEngine() *gin.Engine {
r = gin.Default() r = gin.Default()
r.RedirectTrailingSlash = true
return r 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))
r.POST("/line/", context.PatchCtx(line.GetRawBody), context.PatchCtx(line.VerifyLine), context.PatchCtx(line.LineWebhook))
} }