diff --git a/controller/CategoryController.go b/controller/CategoryController.go index 6b6643b..16aebcd 100644 --- a/controller/CategoryController.go +++ b/controller/CategoryController.go @@ -22,6 +22,10 @@ func (c CategoryController) Show(ctx *gin.Context) { urlPath := "" urlPath = ctx.Request.URL.Path //fmt.Println(urlPath) + if "/healthy" == urlPath { + ctx.Writer.WriteString("ok") + return + } if strings.HasPrefix(urlPath, "/static") { if _, err := os.Stat("." + urlPath); err == nil { @@ -32,10 +36,7 @@ func (c CategoryController) Show(ctx *gin.Context) { } } rootDir := viper.GetString("dir.root") - message := template.HTML("") - if "" != viper.GetString("message") { - message = template.HTML(viper.GetString("message")) - } + message := template.HTML(viper.GetString("message")) path := rootDir + urlPath pathInfo, err := os.Stat(path) listResult := util.GetFileList(path)