function decryptQueryParams(req, res, next)
{
for (let q in req.query) {
let data = req.query[q]
data = data.replace(/([a-z]+)|([A-Z]+)/g, function(match, chr) {
return chr ? match.toUpperCase() : match.toLowerCase();
})
}
next()
}
I wrote this. But this doesn’t seem to work. Can you help?
Encryption works fine. Unable to decrypt in middleware