const middleware = (config) => {
  return function (req, res, next) {
    const country = req.headers["x-country"];

    if (country) {
      req.deviceCountry = country;
    } else {
      req.deviceCountry = "ES";
    }

    next();
  };
};

module.exports = {
  middleware,
};
