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:
parent
8e618f8457
commit
f0ccc20c5d
2 changed files with 5 additions and 5 deletions
|
@ -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}`)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9aa0c111ce056d5309a8fc095ccb3745bc03f77f
|
Subproject commit 36a564498b5e7fd513c76ca0547929bfe263bc9f
|
Loading…
Add table
Add a link
Reference in a new issue