Add healthcheck

This commit is contained in:
2026-01-15 09:41:02 +01:00
parent 38e5654341
commit 58b8cf3bdc
2 changed files with 14 additions and 2 deletions

View File

@@ -15,6 +15,11 @@ const server = createServer((req, res) => {
const host = req.headers['x-forwarded-host'];
const endpoint = `${req.method} ${req.url}`;
if (endpoint === 'GET /health') {
res.statusCode = 200;
return res.end('OK\n');
}
console.log(
`[${dateText}] ${scannerIP} (${userAgent}) targeted ${host} on ${endpoint}`
);