How crowdsecurity/cs-nginx-bouncer works
CrowdSec NGINX Bouncer is a Lua access-control bouncer for NGINX. A request enters NGINX’s access_by_lua_file hook, where the bouncer checks new or unknown IPs against the CrowdSec API; requests deemed blocked receive HTTP 403, and the block is cached. The README also identifies the CrowdSec Lua library as the bouncer’s backend. Source excerpts were unavailable, so these relationships are based on README statements; internal implementation details and cache behavior beyond the documented write are not inferred.
Main entry points: crowdsec_nginx.conf Lua access hook
Components 8
Request entry
- NGINX
- Lua access hook
nginx/crowdsec_nginx.conf - HTTP response
Block decision
- CrowdSec Lua bouncer
- CrowdSec API
- Block cache
- CrowdSec Lua library
Other components
- Request client
Connections 7
- Request client → NGINX: sends request
README.md - NGINX → Lua access hook: runs access hook
README.md - Lua access hook → CrowdSec Lua bouncer: invokes bouncer
README.md - CrowdSec Lua bouncer → CrowdSec API: checks IP
README.md - CrowdSec Lua bouncer → Block cache: caches block
README.md - CrowdSec Lua bouncer → HTTP response: returns 403
README.md - CrowdSec Lua bouncer → CrowdSec Lua library: uses library
README.md