From 8a0cd8721a04a1ae486bc78337cd66af6fd4fe0b Mon Sep 17 00:00:00 2001 From: radex Date: Wed, 7 Feb 2024 17:47:17 +0100 Subject: [PATCH] Fix printing without specified content-type --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b35b642..b3a7929 100644 --- a/index.js +++ b/index.js @@ -103,7 +103,7 @@ app.get('/printers/:name/jobs', (req, res) => { // --- Print API --- -app.post('/print', bodyParser.raw({ type: '*/*', limit: MAX_SIZE_MB * 1_000_000 }), (req, res) => { +app.post('/print', bodyParser.raw({ type: () => true, limit: MAX_SIZE_MB * 1_000_000 }), (req, res) => { const { body, query, headers } = req console.log("Received print job: ", { body, query })