fix api header spec (#89)

This commit is contained in:
T. von Dein
2026-07-10 13:58:56 +02:00
parent 311a8474d6
commit 15dbf7ada0

View File

@@ -223,7 +223,7 @@ func CallAPI(conf *cfg.Config, verb, path, data string) ([]byte, error) {
return nil, err
}
if !conf.HumanCat && strings.HasPrefix(path, "/_cat") {
if !conf.HumanCat || (conf.HumanCat && !strings.HasPrefix(path, "/_cat")) {
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
}