Handle GET and non-POST requests in worker.js

This commit is contained in:
denuitt1
2026-05-03 13:33:11 -07:00
committed by GitHub
parent 6205c9c9ef
commit e2290d295c
+8
View File
@@ -13,6 +13,14 @@ export default {
return json({ e: "loop detected" }, 508);
}
if (request.method == "GET") {
return json({ e: "Relay is Active." }, 200);
}
if (request.method !== "POST") {
return json({ e: "Method not allowed." }, 405);
}
const req = await request.json();
if (!req.u) {