[!IMPORTANT]
Please read this article to learn more.
import { turnstile } from 'https://esm.sh/@boywithkeyboard/turnstile'
npm i @boywithkeyboard/turnstile
import { turnstile } from '@boywithkeyboard/turnstile'
async function handleRequest(req) {
const body = await req.formData()
const result = await turnstile.verify({
secret: '...',
response: body.get('cf-turnstile-response'),
ip: req.headers.get('cf-connecting-ip')
})
}