Add serve from rclone; add readiness check for each debrid, rather than waiting for all to be ready

This commit is contained in:
Mukhtar Akere
2025-05-22 20:01:10 +01:00
parent a2bdad7c2a
commit 83a453cd0c
6 changed files with 105 additions and 65 deletions

View File

@@ -153,7 +153,10 @@ func (wd *WebDav) Start(ctx context.Context) error {
func (wd *WebDav) mountHandlers(r chi.Router) {
for _, h := range wd.Handlers {
r.Mount("/"+h.Name, h) // Mount to /name since router is already prefixed with /webdav
r.Route("/"+h.Name, func(r chi.Router) {
r.Use(h.readinessMiddleware)
r.Mount("/", h)
}) // Mount to /name since router is already prefixed with /webdav
}
}