Commit 2861f92
committed
fix: derive bouncer Valid status from revoked field (CrowdSec >= v1.7.x)
CrowdSec v1.7.x replaced the "valid" JSON field with "revoked: false"
in the bouncers list API response. The manager still reads "valid",
which no longer exists, causing all bouncers to show as "disconnected".
This fix reads the "revoked" field and derives Valid = !Revoked.
Falls back to treating the bouncer as valid if neither field is present.
Fixes #471 parent 8c92c4f commit 2861f92
2 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
52 | 68 | | |
53 | 69 | | |
54 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
0 commit comments