diff options
author | Erik Michelson | 2019-09-18 22:18:22 +0200 |
---|---|---|
committer | Erik Michelson | 2019-09-18 22:18:22 +0200 |
commit | 4d62e6b0b588d53ab1b4f163f946c9be39f1b301 (patch) | |
tree | 9b0d58eef64f2573195febed6168bed29ffee76f | |
parent | 110eef691e27c717673c5894e270895da52cba66 (diff) |
Fixed #179 (redirect loop with a trailing slash)
Signed-off-by: Erik Michelson <erik@liltv.de>
Diffstat (limited to '')
-rw-r--r-- | app.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -126,9 +126,9 @@ app.use(i18n.init) // routes without sessions // static files -app.use('/', express.static(path.join(__dirname, '/public'), { maxAge: config.staticCacheTime, index: false })) -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('/', express.static(path.join(__dirname, '/public'), { maxAge: config.staticCacheTime, index: false, redirect: false })) +app.use('/docs', express.static(path.resolve(__dirname, config.docsPath), { maxAge: config.staticCacheTime, redirect: false })) +app.use('/uploads', express.static(path.resolve(__dirname, config.uploadsPath), { maxAge: config.staticCacheTime, redirect: false })) app.use('/default.md', express.static(path.resolve(__dirname, config.defaultNotePath), { maxAge: config.staticCacheTime })) // session |