Skip to content

azurit/modsecurity-recaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

ModSecurity reCAPTCHA

ModSecurity library for reCAPTCHA validation.

Requirements

  • ModSecurity compiled with Lua support
  • lua-http library

Usage example

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"

About

ModSecurity library for reCAPTCHA validation.

Resources

License

Stars

Watchers

Forks

Languages