diff options
author | Sheogorath | 2018-10-04 02:44:29 +0200 |
---|---|---|
committer | Sheogorath | 2018-11-12 21:42:55 +0100 |
commit | e8ec9a8af4357b39c40953aec72845d42276a33c (patch) | |
tree | cb55be75797f0a508cee517876b9f90d60c133ad | |
parent | 1d8c83cec597760392c7fb5301ce54eb15e17085 (diff) |
Enforce disabled index for static assets
ExpressJS still does allow serving index.html files. This change
disables that permanently.
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
-rw-r--r-- | app.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 })) |