UNPKG

keystone

Version:

Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose

12 lines (11 loc) 278 B
module.exports = function bindErrorHandlers (keystone, app) { if (Object.keys(keystone._redirects).length) { app.use(function (req, res, next) { if (keystone._redirects[req.path]) { res.redirect(keystone._redirects[req.path]); } else { next(); } }); } };