added webdav filter for macos files

This commit is contained in:
ston1th 2019-09-02 10:25:36 +02:00
commit 196b6959da
3 changed files with 7 additions and 4 deletions

View file

@ -111,6 +111,7 @@ func (s *HTTPServer) buildRoutes() http.Handler {
r.NotFoundHandler = &notFoundHandler{s}
if s.Config.WebDav {
fs := authdav.NewWriteOnlyOnceFileSystem(webdav.Dir(s.Config.DataDir))
fs.Filters = []authdav.Filter{authdav.NewMacOSFilter()}
h := authdav.NewWebdavBasicAuth(core.WebDavPrefix, fs, nil, webdavLogger, s.DB, "DocStore WebDav")
r.PathPrefix(core.WebDavPrefix).Handler(h)
}