From e4aa4f63cdbba8df58744230a78d989411c1f20f Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Fri, 12 Jan 2024 12:50:01 -0500 Subject: [PATCH] feat: dont require homeorg for healthz --- src/middleware.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/middleware.js b/src/middleware.js index 1f0db15..e1c559f 100644 --- a/src/middleware.js +++ b/src/middleware.js @@ -65,6 +65,11 @@ const assertApiKey = (req, res, next) => { }; const assertHomeOrgExists = async (req, res, next) => { + // Skip everything if the request is a GET request to /healthz + if (req.method === "GET" && req.path === "/healthz") { + return next(); + } + try { const homeOrgUid = await getHomeOrgUid();