From 2d15f439f34e352ffdb7d81f2f26078edbae4d07 Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 25 May 2020 21:41:14 +0200 Subject: [PATCH] limit per user --- config.js | 3 ++- index.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config.js b/config.js index 259f3cc..6f2cf5c 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,6 @@ module.exports = { port: 8080, username: 'user', - password: 'dav' + password: 'dav', + limit: 10000 // limit per user } \ No newline at end of file diff --git a/index.js b/index.js index 8192b70..a068a11 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,7 @@ const config = require('./config'), requireAuthentification: true, httpAuthentication: new webdav.HTTPBasicAuthentication(userManager, 'DAV Auth'), privilegeManager: privilegeManager, - storageManager: new webdav.PerUserStorageManager(10000), + storageManager: new webdav.PerUserStorageManager(config.limit), rootFileSystem: new webdav.PhysicalFileSystem(__dirname + '/public') }) @@ -19,6 +19,6 @@ privilegeManager.setRights(user, '/', ['all']) app.disable('x-powered-by') .use('/', webdav.extensions.express('/dav', server)) .use(express.static(__dirname + '/public'), serveIndex('public/', { 'icons': true, view: 'details' })) - .listen(config.port, () => { + .listen(config.port, () => { console.log('Listening om: ::' + config.port) }) \ No newline at end of file