mirror of
https://github.com/djhackersdev/minime.git
synced 2026-07-05 09:40:54 -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:
parent
4a2b3f51a4
commit
3fea2dae56
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user