Skip to content

Commit

Permalink
basic health endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ktzsolt committed Nov 22, 2023
1 parent ace5642 commit 392c283
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions handler/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ func Convert(c *fiber.Ctx) error {

log.Debugf("Incoming connection from %s %s %s", c.IP(), reqHostname, reqURIwithQuery)

// /health endpoint
if reqURI == "/health" {
c.SendString("UP!")
c.SendStatus(http.StatusOK)
return nil
}


if !helper.CheckAllowedType(filename) {
msg := "File extension not allowed! " + filename
log.Warn(msg)
Expand Down

0 comments on commit 392c283

Please sign in to comment.