fix: self-check was not logged

Massimo Melina committed Jan 2, 2024 at 11:56 UTC 6ed2638ba82af4eec71f19bdbb9a3fec290c311f
1 file changed +5 -2
src/selfCheck.ts
+5 -2
@@ -7,8 +7,11 @@ import { haveTimeout } from './cross'
7 import { httpString } from './util-http'
8
9 const CHECK_URL = SPECIAL_URI + 'self-check'
10 -export const selfCheckMiddleware: Middleware = (ctx, next) => // koa format
11 - ctx.url.startsWith(CHECK_URL) ? ctx.body = 'HFS' : next()
10 +export const selfCheckMiddleware: Middleware = async (ctx, next) => { // koa format
11 + if (ctx.url.startsWith(CHECK_URL))
12 + ctx.body = 'HFS'
13 + await next()
14 +}
15
16 export async function selfCheck(url: string) {
17 interface PortScannerService {