Merge pull request #2497 from codeflash-ai/chore/make-health-check-public-in-cfapi

Chore: expose healthcheck endpoint publicly for cf-api
This commit is contained in:
mohammed ahmed 2026-03-29 09:41:48 +02:00 committed by GitHub
commit 2612a56994
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -14,9 +14,9 @@ export const GITHUB_WEBHOOK_PATH = "/cfapi/github"
export const ROUTES = {
// Root
ROOT: "/",
HEALTHCHECK: "/healthcheck",
// Public API (no auth)
HEALTHCHECK: "/healthcheck",
TEST_SENTRY: "/test-sentry",
SLACK_EVENTS: "/slack-events",

View file

@ -12,8 +12,6 @@ rootRoutes.get(ROUTES.ROOT, (req, res) => {
return res.status(200).send("OK")
})
rootRoutes.get(ROUTES.HEALTHCHECK, healthcheck)
// Public API routes (mounted under API_BASE_ROUTE)
// Using addAsync to properly handle async route handlers and pass errors to Express error middleware
const publicApiRouter = addAsync(Router()) as any
@ -21,3 +19,4 @@ export const publicApiRoutes = publicApiRouter
publicApiRouter.get(ROUTES.TEST_SENTRY, testSentry)
publicApiRouter.postAsync(ROUTES.SLACK_EVENTS, handleSlackEvents)
publicApiRouter.get(ROUTES.HEALTHCHECK, healthcheck)