This page is about Caddy 1 and will stay here forever.

User Guide

http.recaptcha
Plugin

The recaptcha directive performs reCAPTCHA validation on incoming requests. Upon receiving a specified type of request, it extracts the response token and sends it to the reCAPTCHA server. If the request is invalid, recaptcha drops it and returns a 400 status code. This allows backends to simplify their code and logic. However, the recaptcha directive does not inject reCAPTCHA code into outgoing HTML pages. Instead, that can be done with the http.filter plugin.

Full documentation

Examples

v3 Syntax
recaptcha v3 secret { action [threshold] [method] path }
  • secret is the secret key
  • action is the action
  • threshold is the lower bound of allowed scores
    • float between 0.0 and 1.0
    • default is .5
  • method is the request method to validate
    • one of POST, PUT, PATCH
    • default is POST
  • path is the URL path to validate
v2 Syntax
recaptcha v2 secret { [method] path }
  • secret is the secret key
  • method is the request method to validate
    • one of POST, PUT, PATCH
    • default is POST
  • path is the URL path to validate
Related Links
Documentation

Access the full documentation for this plugin off-site:

Docs
Plugin Help

Get help from the maintainers of the http.recaptcha plugin:

Support
Plugin Website

Visit http.recaptcha's website for more information:

Website
Plugin Author: William Wang
Last Updated: 11 Jul 2019, 9:25 PM
This plugin is independent of the Caddy project and is not endorsed or maintained by Caddy developers. Use at your own risk. Do not file issues for this plugin on Caddy's bug tracker.