mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
lapi to capi : allow push of tainted/custom/manual decisions (#1154)
* add console command to control signal sharing * modify metrics endpoint to add lastpush Co-authored-by: alteredCoder <kevin@crowdsec.net>
This commit is contained in:
parent
50fb1e3df1
commit
6e92da76ad
36 changed files with 851 additions and 81 deletions
|
@ -156,10 +156,14 @@ func (c *Controller) CreateAlert(gctx *gin.Context) {
|
|||
gctx.JSON(http.StatusInternalServerError, gin.H{"message": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
if !matched {
|
||||
continue
|
||||
}
|
||||
alert.Decisions = append(alert.Decisions, profileDecisions...)
|
||||
|
||||
if len(alert.Decisions) == 0 { // non manual decision
|
||||
alert.Decisions = append(alert.Decisions, profileDecisions...)
|
||||
}
|
||||
profileAlert := *alert
|
||||
c.sendAlertToPluginChannel(&profileAlert, uint(pIdx))
|
||||
if profile.OnSuccess == "break" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue