From fa3175c044c62f10f2239d51c46aff0a294bbc2d Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Tue, 17 Jun 2025 12:47:22 +0000 Subject: [PATCH] fix: update health check endpoint and response for firewall --- .../commands/FirewallCommand/ServeCommand/firewall/server.ts | 4 ++-- packages/pockethost/src/services/ProxyService.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pockethost/src/cli/commands/FirewallCommand/ServeCommand/firewall/server.ts b/packages/pockethost/src/cli/commands/FirewallCommand/ServeCommand/firewall/server.ts index fff48d8a..6412fd0f 100644 --- a/packages/pockethost/src/cli/commands/FirewallCommand/ServeCommand/firewall/server.ts +++ b/packages/pockethost/src/cli/commands/FirewallCommand/ServeCommand/firewall/server.ts @@ -42,9 +42,9 @@ export const firewall = async () => { app.use(cors()) app.use(enforce.HTTPS()) - app.get(`/_api/health`, (req, res, next) => { + app.get(`/_api/firewall/health`, (req, res, next) => { dbg(`Health check`) - res.json({ status: 'ok' }) + res.json({ status: 'firewall ok' }) res.end() }) diff --git a/packages/pockethost/src/services/ProxyService.ts b/packages/pockethost/src/services/ProxyService.ts index 063ddbfe..ae72ee20 100644 --- a/packages/pockethost/src/services/ProxyService.ts +++ b/packages/pockethost/src/services/ProxyService.ts @@ -109,7 +109,7 @@ export const proxyService = mkSingleton( res.end }) - server.use('/_api', apiRouter) + server.use('/_api/daemon', apiRouter) // Default locals server.use((req, res, next) => {