module.exports = function (req, res, next) { const token = req.headers["x-access-token"]; if (!token || token !== process.env.ACCESS_TKN) { return res.status(401).json({ error: "Unauthorized" }); } next(); };