Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
fix: Augmented "friendliness" towards health check tools
Browse files Browse the repository at this point in the history
  • Loading branch information
devkcud committed Jul 15, 2024
1 parent 1ec73bd commit a88ef03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ func main() {
router := gin.New()
router.Use(gin.Logger(), gin.Recovery(), middleware.DisableCaching, middleware.DetectLanguage, middleware.GetAPIKey)

router.GET("/healthcare", func(ctx *gin.Context) {
// Apparently, some testing frameworks and is-this-alive-checking-tools just can't handle GET and prefer OPTIONS instead :/
router.Any("/healthcare", func(ctx *gin.Context) {
ctx.Writer.WriteString(ctx.Keys["lang"].(translations.Translation).Hello)
})

Expand Down

0 comments on commit a88ef03

Please sign in to comment.