From 50f8101e867f9c1a5794d9e7a079833fbb098431 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 3 Oct 2025 14:55:45 +0200 Subject: [PATCH] Fix file upload --- lib/http-worker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/http-worker.js b/lib/http-worker.js index eb5a0dd74..fb9bc2f24 100644 --- a/lib/http-worker.js +++ b/lib/http-worker.js @@ -777,7 +777,10 @@ app.get('/api/logo', function (req, res) { }); }); -app.post('/upload-blob', Express.json({limit:"500kb"}), (req, res) => { +app.use('/upload-blob', Express.json({limit:"500kb"}), (req, res) => { + if (req.method !== "POST") { + return res.status(403).send(); + } const { chunk, sig, edPublic } = req.body; if (!cpcrypto) { return void res.status(500).send({error: 'NOCRYPTO'});