Allow additional content-type parameters

This commit is contained in:
Thomas Hobson 2021-05-07 20:12:27 +12:00
parent d95d67071c
commit eaf0ba34bd
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 1 additions and 1 deletions

View File

@ -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({