const expressBunker = require('@yandex-int/express-bunker');
const getEnv = require('../lib2/getEnv');

module.exports = () => (req, res, next) => {
    if (getEnv(req) === 'ui-test' && !req.cookies.__bunker__) {
        return;
    }

    expressBunker(req.config.bunker)(req, res, next);
};
