diff --git a/packages/core/framework/src/http/express-loader.ts b/packages/core/framework/src/http/express-loader.ts index 344711ffb1..98d54ec541 100644 --- a/packages/core/framework/src/http/express-loader.ts +++ b/packages/core/framework/src/http/express-loader.ts @@ -11,6 +11,8 @@ import { MedusaRequest, MedusaResponse } from "./types" const NOISY_ENDPOINTS_CHUNKS = ["@fs", "@id", "@vite", "@react", "node_modules"] +const isHealthCheck = (req: MedusaRequest) => req.path === "/health" + export async function expressLoader({ app }: { app: Express }): Promise<{ app: Express shutdown: () => Promise @@ -69,6 +71,7 @@ export async function expressLoader({ app }: { app: Express }): Promise<{ function shouldSkipHttpLog(req: MedusaRequest, res: MedusaResponse) { return ( isTest || + isHealthCheck(req) || NOISY_ENDPOINTS_CHUNKS.some((chunk) => req.url.includes(chunk)) || !logger.shouldLog("http") )