From 3fea2dae56db81b9787411caa5d2efb05f7bfedb Mon Sep 17 00:00:00 2001 From: Tau Date: Fri, 12 Jul 2019 14:12:25 -0400 Subject: [PATCH] allnet.ts: Restrict request filter to PowerOn PowerOn uses HTTP slightly incorrectly, but other endpoints use HTTP incorrectly in different ways (or maybe even correctly, who knows). Scope the current request interceptor to just PowerOn. --- src/allnet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/allnet.ts b/src/allnet.ts index baf494e..82b03fd 100644 --- a/src/allnet.ts +++ b/src/allnet.ts @@ -14,7 +14,7 @@ const app = express(); // So in the absence of any exotic Transfer-Encoding headers this Content-Type // is incorrect and we have to override Express' built-in handling. -app.use(async function(req, res, next) { +app.use("/sys/servlet/PowerOn", async function(req, res, next) { if (req.method !== "POST") { return res.status(405).end(); }