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.
This commit is contained in:
Tau 2019-07-12 14:12:25 -04:00
parent 4a2b3f51a4
commit 3fea2dae56

View File

@ -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();
}