add route for wiki-pages which start with a forward slash (fixes #21)

This commit is contained in:
orenom
2021-10-30 20:27:10 +02:00
parent 68a7f41d2b
commit 2422a60aa0
+5
View File
@@ -66,6 +66,11 @@ module.exports = (app, utils) => {
return handleWikiPage(req, res, '/wiki/')
})
// This route handles wiki-pages starting with forward slash (issue #21))
app.get('/wiki//:page?/:sub_page?', (req, res, next) => {
return handleWikiPage(req, res, '/wiki/')
})
app.get('/w/:file', (req, res, next) => {
return handleWikiPage(req, res, '/w/')
})