KO
|
EN
gitlite โ search
Search
#typescript
#ai-agents
#deepseek-harness
#dsh-plugin
#open-source
#ai
#claude-code
#cli
#windows
#codex
#developer-tools
#dsh
recaptcha-worker
โ 42
Open GitHub โ
reCAPTCHA v3 Cloudflare Worker
Download README (.md)
Explore Similar Repositories
recaptcha2
:
Easy verifier for google reCAPTCHA version 2 for Node.js and Express.js
captcha-harvester
:
Solve captcha beforehand and use them when needed.
Codeigniter-recaptcha
:
CodeIgniter library to use Google's reCAPTCHA V2
simple-recaptcha-v3
:
๐ค This repository contains simple reCAPTCHA v3 integration for your Laravel application.
reCAPTCHA-V2-java
:
Java Bindings for reCAPTCHA V2. See https://developers.google.com/recaptcha/docs/verify
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
recaptcha-worker
?
Download (.md)
# Google reCAPTCHA v3 Cloudflare Worker Google reCAPTCHA v3 Cloudflare Worker that handles the server-side verification of your reCAPTCHA. ## Installation This requires you to have a Cloudflare Workers account and have the Workers CLI installed. If you haven't already, follow this https://developers.cloudflare.com/workers/get-started/guide 1. Deploy it [](https://deploy.workers.cloudflare.com/?url=https://github.com/HR/recaptcha-worker) 2. Set your [reCAPTCHA secret key](https://developers.google.com/recaptcha/intro) environment variable ``` $ wrangler secret put RECAPTCHA_SECRET --env recaptcha-worker ``` 3. Write the client-side request code (see Usage) ## Usage ### Request From your client-side, make a `POST` request to your deployed cloudflare worker endpoint with the header field `g-recaptcha` set to your reCAPTCHA token. Like so: ```Javascript $.ajax({ type: 'POST', url: 'https://recaptcha-worker.YOUR-SUBDOMAIN.workers.dev', headers: { 'g-recaptcha': YOUR_RECAPTCHA_TOKEN }, error: function (res, status, error) { if (res.status === 400) { // Verification failed } else { // An error occured console.log(res.responseText) } }, success: function (res) { // Verification successful // POST the form data to your backend or something } }) ``` ### Response If the verification request succeeds, you'll get a `202` HTTP status code response with the body `reCAPTCHA passed`. If the verification request fails, you will get `400` HTTP status code response with the body `reCAPTCHA failed`. Otherwise, for any other error, you will get `500` HTTP status code response with the body being the error stack.