mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Redirect changes (removed .html)
This commit is contained in:
@@ -159,9 +159,9 @@ function GetApp() {
|
|||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
|
|
||||||
function AddHtmlRoutes(files) {
|
function AddHtmlRoutes(files) {
|
||||||
const routes = files.reduce((acc, f) => {
|
const routes = files.reduce((acc, file) => {
|
||||||
if (f.includes('html')) {
|
if (file.includes('html')) {
|
||||||
acc.push(f.split('.')[0])
|
acc.push(file.split('.')[0])
|
||||||
return acc
|
return acc
|
||||||
}
|
}
|
||||||
return acc
|
return acc
|
||||||
@@ -171,7 +171,7 @@ function GetApp() {
|
|||||||
logger.DebugLog(`Added route /${route}`, 'Qmining routes', 1)
|
logger.DebugLog(`Added route /${route}`, 'Qmining routes', 1)
|
||||||
app.get(`/${route}`, function(req, res) {
|
app.get(`/${route}`, function(req, res) {
|
||||||
logger.LogReq(req)
|
logger.LogReq(req)
|
||||||
res.redirect(`${route}.html`)
|
res.redirect(`${route}`)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Submodule submodules/qmining-page updated: 9aa0c111ce...36a564498b
Reference in New Issue
Block a user