summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-11-12 22:11:05 +0100
committerGitHub2018-11-12 22:11:05 +0100
commit8ad3fdc3cad106fd84abcb93ffc20990cfba5cb9 (patch)
treecb55be75797f0a508cee517876b9f90d60c133ad
parent1d8c83cec597760392c7fb5301ce54eb15e17085 (diff)
parente8ec9a8af4357b39c40953aec72845d42276a33c (diff)
Merge pull request #983 from SISheogorath/fix/disableIndexes
Enforce disabled index for static assets
-rw-r--r--app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app.js b/app.js
index c2e958a6..33956ce9 100644
--- a/app.js
+++ b/app.js
@@ -125,7 +125,7 @@ app.use(i18n.init)
// routes without sessions
// static files
-app.use('/', express.static(path.join(__dirname, '/public'), { maxAge: config.staticCacheTime }))
+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('/default.md', express.static(path.resolve(__dirname, config.defaultNotePath), { maxAge: config.staticCacheTime }))