From 94abcd3f0ae814d2e057e14c7e5cbc96822c6803 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Wed, 3 Sep 2025 10:29:00 +0000 Subject: [PATCH] chore: add ipStatus to /live endpoint --- src/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index d6b106a..c50d24f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -131,12 +131,11 @@ addon.get('/live', async (req: Request, res: Response) => { if (blockedCount > 0) { // TODO: fail health check and try to get a clean IP if infra is ready logger.warn('IP might be not clean and leading to blocking.', ctx); - } - - if (errorCount === sources.length) { + res.json({ status: 'ok', ipStatus: 'error' }); + } else if (errorCount === sources.length) { res.status(503).json({ status: 'error' }); } else { - res.json({ status: 'ok' }); + res.json({ status: 'ok', ipStatus: 'ok' }); } });