From 825ee4e66e79271c39631f2b9eb059caa8f17bfc Mon Sep 17 00:00:00 2001 From: WilliButz Date: Wed, 26 Sep 2018 17:18:33 +0200 Subject: app.js: add missing routes for configurable paths Signed-off-by: WilliButz --- app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.js b/app.js index ab37bff1..76ff6644 100644 --- a/app.js +++ b/app.js @@ -126,6 +126,9 @@ app.use(i18n.init) // routes without sessions // static files app.use('/', express.static(path.join(__dirname, '/public'), { maxAge: config.staticCacheTime })) +app.use('/docs', express.static(path.resolve(__dirname, config.docsPath), { maxAge: config.staticCacheTime })) +app.use('/uploads', express.static(path.resolve(__dirname, config.uploadsPath), { maxAge: config.staticCacheTime })) +app.use('/default.md', express.static(path.resolve(__dirname, config.defaultNotePath), { maxAge: config.staticCacheTime })) // session app.use(session({ -- cgit v1.2.3