From a985b748e985718b4b680221f88cfbaf6f9e805f Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Tue, 7 Feb 2023 15:14:39 +0800 Subject: [PATCH] fix: allow_indexed check (close #3291) --- internal/search/util.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/search/util.go b/internal/search/util.go index e89fae18c10..8d03b740c33 100644 --- a/internal/search/util.go +++ b/internal/search/util.go @@ -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) }