| @@ -52,7 +52,7 @@ for (let nuser = 0 ; nuser < users.length; nuser++) { | |||||
| console.log(user); | console.log(user); | ||||
| } | } | ||||
| const httpAuthentication = new webdav.HTTPBasicAuthentication(userManager); | |||||
| const httpAuthentication = new webdav.HTTPBasicAuthentication(userManager, config.realm); | |||||
| const serverOptions: webdav.WebDAVServerOptions = { | const serverOptions: webdav.WebDAVServerOptions = { | ||||
| port: config.port || 8080, | port: config.port || 8080, | ||||
| @@ -64,6 +64,17 @@ const serverOptions: webdav.WebDAVServerOptions = { | |||||
| const server = new webdav.WebDAVServer(serverOptions); | 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; | let nMount = 0; | ||||
| //@ts-ignore | //@ts-ignore | ||||