diff options
-rwxr-xr-x | server.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,7 +29,7 @@ var configFile = path.resolve(__dirname, process.argv[3] || '.config.json'); | |||
29 | mkdirp.sync(rootFolder); | 29 | mkdirp.sync(rootFolder); |
30 | 30 | ||
31 | var config = { | 31 | var config = { |
32 | folderListingEnabled: true | 32 | folderListingEnabled: false |
33 | }; | 33 | }; |
34 | 34 | ||
35 | function getSettings(req, res, next) { | 35 | function getSettings(req, res, next) { |
@@ -87,7 +87,7 @@ app.use(router); | |||
87 | app.use('/_admin', express.static(__dirname + '/frontend')); | 87 | app.use('/_admin', express.static(__dirname + '/frontend')); |
88 | app.use('/', express.static(rootFolder)); | 88 | app.use('/', express.static(rootFolder)); |
89 | app.use('/', function welcomePage(req, res, next) { | 89 | app.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 | }); |
93 | app.use('/', function (req, res, next) { | 93 | app.use('/', function (req, res, next) { |