fix: allow_indexed check (close #3291)

pull/3296/head
Noah Hsu 2023-02-07 15:14:39 +08:00
parent 44cb8aaafe
commit a985b748e9
1 changed files with 3 additions and 1 deletions

View File

@ -52,10 +52,12 @@ func updateIgnorePaths() {
url := addition.Address + "/api/public/settings"
res, err := base.RestyClient.R().Get(url)
if err == nil {
allowIndexed = utils.Json.Get(res.Body(), "data", conf.AllowIndexed).ToBool()
log.Debugf("allow_indexed body: %+v", res.String())
allowIndexed = utils.Json.Get(res.Body(), "data", conf.AllowIndexed).ToString() == "true"
v3Visited[addition.Address] = allowIndexed
}
}
log.Debugf("%s allow_indexed: %v", addition.Address, allowIndexed)
if !allowIndexed {
ignorePaths = append(ignorePaths, storage.GetStorage().MountPath)
}