about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xbun.lockbbin14725 -> 14725 bytes
-rw-r--r--fly.toml4
-rw-r--r--src/app.ts4
-rw-r--r--static/health.txt1
4 files changed, 4 insertions, 5 deletions
diff --git a/bun.lockb b/bun.lockb
index b4d52ec..1cb7655 100755
--- a/bun.lockb
+++ b/bun.lockb
Binary files differdiff --git a/fly.toml b/fly.toml
index 7e09b9b..039c968 100644
--- a/fly.toml
+++ b/fly.toml
@@ -26,6 +26,4 @@ primary_region = "ams"
   interval = "30s"
   method = "GET"
   timeout = "5s"
-  path = "/health.txt"
-  [http_service.checks.headers]
-    Host = "alanpearce.eu"
+  path = "/health"
diff --git a/src/app.ts b/src/app.ts
index 8ba2d8a..7250a62 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -145,7 +145,9 @@ export const server = {
         "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
     ) {
diff --git a/static/health.txt b/static/health.txt
deleted file mode 100644
index d86bac9..0000000
--- a/static/health.txt
+++ /dev/null
@@ -1 +0,0 @@
-OK