Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix(api): disable healthcheck

Carl-Gerhard Lindesvärdb3fc8ba85044
diff --git a/apps/api/src/controllers/healthcheck.controller.ts b/apps/api/src/controllers/healthcheck.controller.ts
index 26dd4b726..4544fda47 100644
--- a/apps/api/src/controllers/healthcheck.controller.ts
+++ b/apps/api/src/controllers/healthcheck.controller.ts
@@ -21,6 +21,11 @@ export async function healthcheck(
request: FastifyRequest,
reply: FastifyReply,
) {
+ if (process.env.DISABLE_HEALTHCHECK) {
+ return reply.status(200).send({
+ ok: true,
+ });
+ }
const redisRes = await withTimings(getRedisCache().ping());
const dbRes = await withTimings(db.project.findFirst());
const queueRes = await withTimings(eventsQueue.getCompleted());