From eaf0ba34bd6385fd175fb9ed6ae231c397c7318b Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Fri, 7 May 2021 20:12:27 +1200 Subject: [PATCH] Allow additional content-type parameters --- api/src/api/v2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/api/v2.js b/api/src/api/v2.js index bfb1778..c42ff67 100644 --- a/api/src/api/v2.js +++ b/api/src/api/v2.js @@ -7,7 +7,7 @@ const package = require('../package') const logger = require('logplease').create('api/v1'); router.use(function(req, res, next){ - if(req.method == "POST" && req.headers['content-type'] !== "application/json") + if(req.method == "POST" && !req.headers['content-type'].startsWith("application/json")) return res .status(415) .send({