0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/core/server/middleware/maintenance.js

11 lines
265 B
JavaScript
Raw Normal View History

var config = require(__dirname + '/../config'),
errors = require(config.paths.corePath + '/server/errors');
module.exports = function (req, res, next) {
if (config.maintenance.enabled) {
return next(new errors.Maintenance());
}
next();
};