Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
app.get('/png/:identifier/:size', (req, res) => {
res.setHeader('Content-Type', 'image/png');
res.send(jdenticon.toPng(req.params.identifier, Number.parseInt(req.params.size, 10)));
});
router.get('/:hash/:size', (req, res) => {
let
hash = Hash.sha256().update(req.params.hash).digest('hex'),
size = parseInt(req.params.size),
identicon;
if (req.query.format == 'png') {
identicon = jdenticon.toPng(hash, size);
} else {
identicon = jdenticon.toSvg(hash, size);
}
return res.send(identicon);
});
}
Cell: row => (
<img width="100rem" src="{`data:image/png;base64," alt="">
),
},