mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Redirect fixes
This commit is contained in:
parent
f818931a4a
commit
098620cce2
2 changed files with 9 additions and 4 deletions
|
@ -19,7 +19,8 @@
|
||||||
"nextdir": "nextStatic/qminingPagePublic",
|
"nextdir": "nextStatic/qminingPagePublic",
|
||||||
"name": "qmining",
|
"name": "qmining",
|
||||||
"urls": [
|
"urls": [
|
||||||
"qmining.frylabs.net"
|
"qmining.frylabs.net",
|
||||||
|
"localhost"
|
||||||
],
|
],
|
||||||
"isNextJs": true
|
"isNextJs": true
|
||||||
},
|
},
|
||||||
|
@ -30,8 +31,7 @@
|
||||||
],
|
],
|
||||||
"name": "api",
|
"name": "api",
|
||||||
"urls": [
|
"urls": [
|
||||||
"api.frylabs.net",
|
"api.frylabs.net"
|
||||||
"localhost"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"main": {
|
"main": {
|
||||||
|
|
|
@ -178,7 +178,12 @@ function GetApp() {
|
||||||
}
|
}
|
||||||
logger.DebugLog(`Qmining module ${redirect.from} redirect`, 'infos', 1)
|
logger.DebugLog(`Qmining module ${redirect.from} redirect`, 'infos', 1)
|
||||||
|
|
||||||
res.redirect(redirect.to + url.format({ query: req.query }))
|
let target = redirect.to
|
||||||
|
if (!redirect.to.includes('?')) {
|
||||||
|
target += url.format({ query: req.query })
|
||||||
|
}
|
||||||
|
|
||||||
|
res.redirect(target)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue