summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app.js6
-rw-r--r--lib/config/default.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/app.js b/app.js
index 811696ec..f2db1815 100644
--- a/app.js
+++ b/app.js
@@ -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
diff --git a/lib/config/default.js b/lib/config/default.js
index 12254d47..19bbeb21 100644
--- a/lib/config/default.js
+++ b/lib/config/default.js
@@ -32,7 +32,7 @@ module.exports = {
allowAnonymous: true,
allowAnonymousEdits: false,
allowFreeURL: false,
- forbiddenNoteIDs: ['robots.txt', 'favicon.ico', 'api'],
+ forbiddenNoteIDs: ['robots.txt', 'favicon.ico', 'api', 'build', 'css', 'docs', 'fonts', 'js', 'uploads', 'vendor', 'views'],
defaultPermission: 'editable',
dbURL: '',
db: {},