fix: resolve duplicate webdav route definition
All checks were successful
Automated Container Build / build-and-push (push) Successful in 56s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 56s
This commit is contained in:
parent
f69c6d825e
commit
a71b8e024a
1 changed files with 3 additions and 4 deletions
|
|
@ -65,9 +65,6 @@ func main() {
|
|||
tusHandler := handlers.NewTusHandler(db, cfg)
|
||||
// WebDAV Handler
|
||||
webdavHandler := handlers.NewWebDAVHandler(db, cfg, guard)
|
||||
|
||||
// Add WebDAV routes
|
||||
app.All("/webdav/*", guard.Check(), webdavHandler.Handle)
|
||||
archiveHandler := &handlers.ArchiveHandler{DB: db, Config: cfg}
|
||||
shareGuard := middleware.NewBruteForceGuard(3, 60)
|
||||
shareHandler := &handlers.ShareHandler{DB: db, Config: cfg, Guard: shareGuard}
|
||||
|
|
@ -198,6 +195,8 @@ func main() {
|
|||
protected.Post("/onlyoffice/template", onlyOfficeHandler.CreateFromTemplate)
|
||||
protected.Post("/onlyoffice/sign", onlyOfficeHandler.SignConfig)
|
||||
protected.Get("/onlyoffice/files", onlyOfficeHandler.ListOfficeFiles)
|
||||
|
||||
|
||||
|
||||
protected.Get("/files/folders-tree", fsHandler.GetFolderTree)
|
||||
|
||||
|
|
@ -232,7 +231,7 @@ func main() {
|
|||
|
||||
// WebDAV Endpoint (accepts basic auth OR bearer)
|
||||
// We use All() because WebDAV uses custom HTTP methods (PROPFIND, MKCOL, LOCK, etc.)
|
||||
app.All("/webdav/*", webdavHandler.Handle)
|
||||
app.All("/webdav/*", guard.Check(), webdavHandler.Handle)
|
||||
|
||||
// Start server
|
||||
addr := fmt.Sprintf(":%s", cfg.Port)
|
||||
|
|
|
|||
Reference in a new issue