Create /health handler
4 files changed, 4 insertions(+), 5 deletions(-)
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 ) {