From c275e6f6f0f9397fc1f77deb4cc6ac40e8dc0dfe Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 3 Jan 2021 08:08:40 +0100 Subject: [PATCH] realm --- src/index.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 3aaac66..7a845d2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -52,7 +52,7 @@ for (let nuser = 0 ; nuser < users.length; nuser++) { console.log(user); } -const httpAuthentication = new webdav.HTTPBasicAuthentication(userManager); +const httpAuthentication = new webdav.HTTPBasicAuthentication(userManager, config.realm); const serverOptions: webdav.WebDAVServerOptions = { port: config.port || 8080, @@ -64,6 +64,17 @@ const serverOptions: webdav.WebDAVServerOptions = { const server = new webdav.WebDAVServer(serverOptions); +/* +server.afterRequest((arg, next) => { + // Display the method, the URI, the returned status code and the returned message + console.log('>>', arg.request.method, arg.requested.uri, '>', arg.response.statusCode, arg.response.statusMessage); + // If available, display the body of the response + console.log(arg.responseBody); + next(); +}); +*/ + + let nMount = 0; //@ts-ignore