Skip to content

Commit

Permalink
fix: allow_indexed check (close #3291)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Feb 7, 2023
1 parent 44cb8aa commit a985b74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/search/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit a985b74

Please sign in to comment.