From 58084c8dea5790796e34540b68d70d4be57395d3 Mon Sep 17 00:00:00 2001 From: Moin Ahmad <48400531+moinologics@users.noreply.github.com> Date: Sun, 22 Sep 2024 22:32:48 +0530 Subject: [PATCH] implement HEAD /health (#688) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 饺子w (Yumechi) --- router/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router/router.go b/router/router.go index 8b1d3641..aacd072a 100644 --- a/router/router.go +++ b/router/router.go @@ -104,7 +104,7 @@ func Create(db *database.GormDatabase, vInfo *model.VersionInfo, conf *config.Co ui.Register(g, *vInfo, conf.Registration) - g.GET("/health", healthHandler.Health) + g.Match([]string{"GET", "HEAD"}, "/health", healthHandler.Health) g.GET("/swagger", docs.Serve) g.StaticFS("/image", &onlyImageFS{inner: gin.Dir(conf.UploadedImagesDir, false)})