const config = require('../config');

function setupContext(req, res, next) {
    if (!req.context) {
        req.context = {};
    }

    req.config = config.setup(req);
    req.context.features = req.config.features;

    next();
}

module.exports = setupContext;
