switch back to startsWith
This is because application/json;charset=utf8 is perfectly valid!
This commit is contained in:
parent
4259e89bb2
commit
1b7504a191
|
@ -12,7 +12,7 @@ router.use((req, res, next) => {
|
|||
return next();
|
||||
}
|
||||
|
||||
if (req.headers['content-type'] !== 'application/json') {
|
||||
if (!req.headers['content-type'].startsWith('application/json')) {
|
||||
return res.status(415).send({
|
||||
message: 'requests must be of type application/json',
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue