Allow additional content-type parameters
This commit is contained in:
parent
d95d67071c
commit
eaf0ba34bd
|
@ -7,7 +7,7 @@ const package = require('../package')
|
||||||
const logger = require('logplease').create('api/v1');
|
const logger = require('logplease').create('api/v1');
|
||||||
|
|
||||||
router.use(function(req, res, next){
|
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
|
return res
|
||||||
.status(415)
|
.status(415)
|
||||||
.send({
|
.send({
|
||||||
|
|
Loading…
Reference in New Issue