Skip to content

Commit 5ba490b

Browse files
Remove dedicated section, keep only updated configuration examples
- Remove the standalone Native HAProxy Redirect section - Keep the updated configuration examples with native redirects and performance optimizations
1 parent 148a972 commit 5ba490b

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

crowdsec-docs/unversioned/bouncers/haproxy_spoa.mdx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -219,24 +219,6 @@ recaptcha
219219
turnstile
220220
```
221221

222-
#### Native HAProxy Redirect (Performance Optimization)
223-
224-
The HAProxy SPOA bouncer now supports native HAProxy redirects for successful CAPTCHA validation, providing better performance and reduced Lua overhead:
225-
226-
```haproxy
227-
## Handle 302 redirect for successful captcha validation (native HAProxy redirect)
228-
http-request redirect code 302 location %[var(txn.crowdsec.redirect)] if { var(txn.crowdsec.remediation) -m str "allow" } { var(txn.crowdsec.redirect) -m found }
229-
230-
## Call lua script only for ban and captcha remediations (performance optimization)
231-
http-request lua.crowdsec_handle if { var(txn.crowdsec.remediation) -m str "captcha" }
232-
http-request lua.crowdsec_handle if { var(txn.crowdsec.remediation) -m str "ban" }
233-
```
234-
235-
This approach provides:
236-
- **Native 302 redirects**: Uses HAProxy's built-in redirect functionality instead of Lua
237-
- **Performance optimization**: Lua script is only called for `ban` and `captcha` remediations
238-
- **Reduced overhead**: Eliminates unnecessary Lua processing for `allow` decisions
239-
- **Better scalability**: Native HAProxy operations are more efficient than Lua-based solutions
240222

241223
### Prometheus Metrics
242224

0 commit comments

Comments
 (0)