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
Copy file name to clipboardExpand all lines: crowdsec-docs/unversioned/bouncers/haproxy_spoa.mdx
-16Lines changed: 0 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,22 +219,6 @@ recaptcha
219
219
turnstile
220
220
```
221
221
222
-
#### Cookie Management (New Approach)
223
-
224
-
The HAProxy SPOA bouncer now supports improved cookie management for CAPTCHA handling. This new approach uses `http-after-response` directives to manage CAPTCHA cookies more efficiently:
225
-
226
-
```haproxy
227
-
## Handle captcha cookie management via HAProxy (new approach)
228
-
## Set captcha cookie when SPOA provides captcha_status (pending or valid)
229
-
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 }
230
-
## Clear captcha cookie when cookie exists but no captcha_status (Allow decision)
231
-
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 }
232
-
```
233
-
234
-
This approach provides:
235
-
- Automatic cookie setting when CAPTCHA status is pending or valid
236
-
- Automatic cookie clearing when the decision is to allow (no CAPTCHA status)
237
-
- More reliable cookie management compared to previous methods
0 commit comments