Skip to content

Commit 2641a6c

Browse files
authored
only warn about capi_whitelists_path being deprecated if actually in use (#3535)
1 parent 3843213 commit 2641a6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/apiserver/apic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ func (a *apic) ApplyApicWhitelists(ctx context.Context, decisions []*models.Deci
854854
log.Errorf("while getting allowlists content: %s", err)
855855
}
856856

857-
if a.whitelists != nil {
857+
if a.whitelists != nil && (len(a.whitelists.Cidrs) > 0 || len(a.whitelists.Ips) > 0) {
858858
log.Warn("capi_whitelists_path is deprecated, please use centralized allowlists instead. See https://docs.crowdsec.net/docs/next/local_api/centralized_allowlists.")
859859
}
860860

0 commit comments

Comments
 (0)