url query formatting fix, removed trailing ? round 2

This commit is contained in:
mrfry 2021-02-15 10:13:29 +01:00
parent 98b17e5b22
commit 10b9539eb9

View file

@ -160,15 +160,15 @@ function GetApp(): ModuleType {
},
{
from: '/allqr',
to: 'http://api.frylabs.net/allqr.txt',
to: 'https://api.frylabs.net/allqr.txt',
},
{
from: '/allqr.txt',
to: 'http://api.frylabs.net/allqr.txt',
to: 'https://api.frylabs.net/allqr.txt',
},
{
from: '/infos',
to: 'http://api.frylabs.net/infos?version=true&motd=true&subjinfo=true',
to: 'https://api.frylabs.net/infos?version=true&motd=true&subjinfo=true',
nolog: true,
},
{
@ -185,7 +185,7 @@ function GetApp(): ModuleType {
logger.DebugLog(`Qmining module ${redirect.from} redirect`, 'infos', 1)
let target = redirect.to
if (!redirect.to.includes('?')) {
if (!redirect.to.includes('https://')) {
target += utils.formatUrl({ query: req.query })
}