enhance: Add supported decisions type and update deps/goversion #113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
based on the same option in cs-firewall-bouncer to keep consistency.
What
Add decision type filtering via config and per-request query parameter.
Update to Go 1.24 and refresh all module dependencies.
Migrate to standard library
slices
.Why
ban
,captcha
).Changes
pkg/cfg/config.go
: addcrowdsec_config.supported_decisions_types: []string
.pkg/registry/registry.go
: storeSupportedDecisionTypes
and filter inGetActiveDecisions
; per-request override via query param; use stdlibslices.Contains
; remove"all"
special-case.cmd/root.go
: propagatesupported_decisions_types
intoregistry.GlobalDecisionRegistry.SupportedDecisionTypes
.go.mod
: bump to Go1.24
, upgrade deps, tidy.slices
(nox/exp
).Usage
If the list is empty or the key is omitted, no type filtering is applied.
Matching is case-insensitive.
Per-request override (query param)
/security/blocklist?supported_decisions_types=ban,captcha
/security/blocklist?supported_decisions_types=ban&supported_decisions_types=captcha
Other filters
ipv4only
,ipv6only
,origin
,nosort
.