fix json validation
This commit is contained in:
parent
5830d7fb43
commit
3ea6ca1180
|
@ -8,7 +8,7 @@ const package = require('../package')
|
|||
const logger = require('logplease').create('api/v2');
|
||||
|
||||
router.use((req, res, next) => {
|
||||
if (!req.body || req.body === '') {
|
||||
if (['GET', 'HEAD', 'OPTIONS'].includes(req.method) || !req.body) {
|
||||
return next();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue