Skip to content

Commit

Permalink
feat: add a public healthcheck endpoint
Browse files Browse the repository at this point in the history
- Adds `/health` as a public facing healthcheck endpoint.
- `/api/health` is meant for internal healthchecks. This endpoint in
  future can serve sensitive information about Listmonk *or* can be
deprecated if there's not enough usecase.

Closes #380
  • Loading branch information
mr-karan committed Jun 3, 2021
1 parent 59bcc8e commit 50dc9fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ func registerHTTPHandlers(e *echo.Echo, app *App) {
"campUUID", "subUUID"))
e.GET("/campaign/:campUUID/:subUUID/px.png", validateUUID(handleRegisterCampaignView,
"campUUID", "subUUID"))
// Public health API endpoint.
e.GET("/health", handleHealthCheck)
}

// handleIndex is the root handler that renders the Javascript frontend.
Expand Down

0 comments on commit 50dc9fc

Please sign in to comment.