Windshaft-cartodb/lib/api/middlewares/initialize-status-code.js
2019-10-07 09:40:50 +02:00

12 lines
248 B
JavaScript

'use strict';
module.exports = function initializeStatusCode () {
return function initializeStatusCodeMiddleware (req, res, next) {
if (req.method !== 'OPTIONS') {
res.statusCode = 404;
}
next();
};
};