mirror of
https://github.com/djhackersdev/minime.git
synced 2026-08-20 01:14:08 -05:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user