You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
http-request lua.crowdsec_handle if { var(txn.crowdsec.remediation) -m found }
173
+
174
+
## Handle captcha cookie management via HAProxy (new approach)
175
+
## Set captcha cookie when SPOA provides captcha_status (pending or valid)
176
+
http-after-response set-header Set-Cookie %[var(txn.crowdsec.captcha_cookie)] if { var(txn.crowdsec.captcha_status) -m found } { var(txn.crowdsec.captcha_cookie) -m found }
177
+
## Clear captcha cookie when cookie exists but no captcha_status (Allow decision)
178
+
http-after-response set-header Set-Cookie %[var(txn.crowdsec.captcha_cookie)] if { var(txn.crowdsec.captcha_cookie) -m found } !{ var(txn.crowdsec.captcha_status) -m found }
179
+
173
180
use_backend <whatever>
174
181
175
182
backend crowdsec-spoa
@@ -212,6 +219,7 @@ recaptcha
212
219
turnstile
213
220
```
214
221
222
+
215
223
### Prometheus Metrics
216
224
217
225
Enable and expose metrics:
@@ -393,6 +401,12 @@ frontend test
393
401
http-request set-header X-CrowdSec-IsoCode %[var(txn.crowdsec.isocode)] if { var(txn.crowdsec.isocode) -m found }
394
402
http-request lua.crowdsec_handle if { var(txn.crowdsec.remediation) -m found }
395
403
404
+
## Handle captcha cookie management via HAProxy (new approach)
405
+
## Set captcha cookie when SPOA provides captcha_status (pending or valid)
406
+
http-after-response set-header Set-Cookie %[var(txn.crowdsec.captcha_cookie)] if { var(txn.crowdsec.captcha_status) -m found } { var(txn.crowdsec.captcha_cookie) -m found }
407
+
## Clear captcha cookie when cookie exists but no captcha_status (Allow decision)
408
+
http-after-response set-header Set-Cookie %[var(txn.crowdsec.captcha_cookie)] if { var(txn.crowdsec.captcha_cookie) -m found } !{ var(txn.crowdsec.captcha_status) -m found }
0 commit comments