Create /health handler
1 file changed, 3 insertions(+), 1 deletion(-)
changed files
M src/app.ts → src/app.ts
@@ -145,7 +145,9 @@ "http.method": request.method, "http.user_agent": request.headers.get("user-agent"), }, }); - if ( + if (pathname === "/health") { + return new Response("OK", { status: 200 }); + } else if ( config.redirect_other_hostnames && request.headers.get("host") !== expectedHostURL.host ) {