Mercurial > hg > orthanc
comparison OrthancServer/Sources/main.cpp @ 4243:64f57c9d5f79
configuration options for webdav
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 09 Oct 2020 18:10:24 +0200 |
parents | 5cfa6ba75dfc |
children | 251a8b07fa37 |
comparison
equal
deleted
inserted
replaced
4242:5cfa6ba75dfc | 4243:64f57c9d5f79 |
---|---|
1039 else | 1039 else |
1040 { | 1040 { |
1041 context.SetExecuteLuaEnabled(false); | 1041 context.SetExecuteLuaEnabled(false); |
1042 LOG(WARNING) << "Remote LUA script execution is disabled"; | 1042 LOG(WARNING) << "Remote LUA script execution is disabled"; |
1043 } | 1043 } |
1044 | |
1045 if (lock.GetConfiguration().GetBooleanParameter("WebDavEnabled", true)) | |
1046 { | |
1047 const bool allowDelete = lock.GetConfiguration().GetBooleanParameter("WebDavDeleteAllowed", false); | |
1048 const bool allowUpload = lock.GetConfiguration().GetBooleanParameter("WebDavUploadAllowed", true); | |
1049 | |
1050 UriComponents root; | |
1051 root.push_back("webdav"); | |
1052 httpServer.Register(root, new OrthancWebDav(context, allowDelete, allowUpload)); | |
1053 } | |
1044 } | 1054 } |
1045 | 1055 |
1046 MyHttpExceptionFormatter exceptionFormatter(httpDescribeErrors, plugins); | 1056 MyHttpExceptionFormatter exceptionFormatter(httpDescribeErrors, plugins); |
1047 | 1057 |
1048 httpServer.SetIncomingHttpRequestFilter(httpFilter); | 1058 httpServer.SetIncomingHttpRequestFilter(httpFilter); |
1049 httpServer.SetHttpExceptionFormatter(exceptionFormatter); | 1059 httpServer.SetHttpExceptionFormatter(exceptionFormatter); |
1050 httpServer.Register(context.GetHttpHandler()); | 1060 httpServer.Register(context.GetHttpHandler()); |
1051 | |
1052 { | |
1053 UriComponents root; // TODO | |
1054 root.push_back("a"); | |
1055 root.push_back("b"); | |
1056 httpServer.Register(root, new OrthancWebDav(context, true /* allow delete */)); | |
1057 } | |
1058 | 1061 |
1059 if (httpServer.GetPortNumber() < 1024) | 1062 if (httpServer.GetPortNumber() < 1024) |
1060 { | 1063 { |
1061 LOG(WARNING) << "The HTTP port is privileged (" | 1064 LOG(WARNING) << "The HTTP port is privileged (" |
1062 << httpServer.GetPortNumber() << " is below 1024), " | 1065 << httpServer.GetPortNumber() << " is below 1024), " |