FIX: qr in index page

This commit is contained in:
Overtorment 2021-09-22 14:03:47 +01:00
parent a01a8c6e14
commit 600556f84c
No known key found for this signature in database
GPG Key ID: AB15F43F78CCBC06

View File

@ -104,7 +104,7 @@ router.get('/qr', function (req, res) {
if (process.env.TOR_URL) { if (process.env.TOR_URL) {
host = process.env.TOR_URL; host = process.env.TOR_URL;
} }
const customPath = req.url.replace('/qr/', ''); const customPath = req.url.replace('/qr', '');
const url = 'bluewallet:setlndhuburl?url=' + encodeURIComponent(req.protocol + '://' + host + customPath); const url = 'bluewallet:setlndhuburl?url=' + encodeURIComponent(req.protocol + '://' + host + customPath);
var code = qr.image(url, { type: 'png' }); var code = qr.image(url, { type: 'png' });
res.setHeader('Content-type', 'image/png'); res.setHeader('Content-type', 'image/png');