ModSecurity library for reCAPTCHA validation.
- ModSecurity compiled with Lua support
- lua-http library
SecAction \
"id:10000,\
phase:1,\
nolog,\
pass,\
setvar:'tx.recaptcha_secret_key=<secret/private_key_here>'"
SecRule &ARGS:g-recaptcha-response "@gt 0" \
"id:10001,\
phase:2,\
deny,\
t:none,\
msg:'reCAPTCHA validation failed.',\
logdata:'reCAPTCHA validation failed.',\
chain"
SecRule ARGS:g-recaptcha-response "@inspectFile recaptcha.lua" "t:none"