mirror of
https://github.com/denuitt1/mhr-cfw.git
synced 2026-05-17 21:24:36 +03:00
Handle GET and non-POST requests in worker.js
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user