aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xserver.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.js b/server.js
index 60c1bdd..f661e87 100755
--- a/server.js
+++ b/server.js
@@ -29,7 +29,7 @@ var configFile = path.resolve(__dirname, process.argv[3] || '.config.json');
29mkdirp.sync(rootFolder); 29mkdirp.sync(rootFolder);
30 30
31var config = { 31var config = {
32 folderListingEnabled: true 32 folderListingEnabled: false
33}; 33};
34 34
35function getSettings(req, res, next) { 35function getSettings(req, res, next) {
@@ -87,7 +87,7 @@ app.use(router);
87app.use('/_admin', express.static(__dirname + '/frontend')); 87app.use('/_admin', express.static(__dirname + '/frontend'));
88app.use('/', express.static(rootFolder)); 88app.use('/', express.static(rootFolder));
89app.use('/', function welcomePage(req, res, next) { 89app.use('/', function welcomePage(req, res, next) {
90 if (req.path !== '/') return next(); 90 if (config.folderListingEnabled || req.path !== '/') return next();
91 res.status(200).sendFile(path.join(__dirname, '/frontend/welcome.html')); 91 res.status(200).sendFile(path.join(__dirname, '/frontend/welcome.html'));
92}); 92});
93app.use('/', function (req, res, next) { 93app.use('/', function (req, res, next) {