mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-22 04:56:30 +02:00
Allow additional content-type parameters
This commit is contained in:
parent
d95d67071c
commit
eaf0ba34bd
1 changed files with 1 additions and 1 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue