diff --git a/server/utils/requestsOfType.js b/server/utils/requestsOfType.js index 5aac7b8c..43bfeb1d 100644 --- a/server/utils/requestsOfType.js +++ b/server/utils/requestsOfType.js @@ -4,7 +4,7 @@ header does not match `type` */ const requestsOfType = type => (req, res, next) => { - const hasContentType = req.get('content-type') !== null; + const hasContentType = req.get('content-type') !== undefined && req.get('content-type') !== null; const isCorrectType = req.is(type) === null || req.is(type) === type; if (hasContentType && !isCorrectType) {