diff --git a/config.example.yml b/config.example.yml index 7607b23..4ea0c92 100644 --- a/config.example.yml +++ b/config.example.yml @@ -6,9 +6,9 @@ token: YOUR_RD_API_TOKEN # https://real-debrid.com/apitoken host: "[::]" port: 9999 -# you can protect zurg's webdav server with username+password auth -# webdav_username: yowmamasita -# webdav_password: 1234 +# you can protect your zurg server with username+password auth +# username: yowmamasita +# password: 1234 # How many requests in parallel should we send to Real-Debrid API? concurrent_workers: 20 diff --git a/internal/config/types.go b/internal/config/types.go index 67310ff..bd10cfd 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -37,8 +37,8 @@ type ZurgConfig struct { Host string `yaml:"host" json:"host"` Port string `yaml:"port" json:"port"` - Username string `yaml:"webdav_username" json:"webdav_username"` - Password string `yaml:"webdav_password" json:"webdav_password"` + Username string `yaml:"username" json:"username"` + Password string `yaml:"password" json:"password"` NumOfWorkers int `yaml:"concurrent_workers" json:"concurrent_workers"` RefreshEverySeconds int `yaml:"check_for_changes_every_secs" json:"check_for_changes_every_secs"` diff --git a/internal/handlers/basicauth.go b/internal/handlers/basicauth.go index 08c809b..52023ef 100644 --- a/internal/handlers/basicauth.go +++ b/internal/handlers/basicauth.go @@ -21,7 +21,7 @@ func (hs *Handlers) basicAuth(next http.Handler) http.Handler { // needsAuth checks if the given path requires authentication. func needsAuth(path string) bool { - authenticatedPaths := []string{"/dav/", "/infuse/"} + authenticatedPaths := []string{"/http/", "/dav/", "/infuse/"} for _, p := range authenticatedPaths { if strings.HasPrefix(path, p) { return true