Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/halitsever/nest-cloudflare-turnstile
☁️ Cloudflare Turnstile Captcha integration for NestJS
https://github.com/halitsever/nest-cloudflare-turnstile
captcha cloudflare integration nest turnstile
Last synced: about 1 month ago
JSON representation
☁️ Cloudflare Turnstile Captcha integration for NestJS
- Host: GitHub
- URL: https://github.com/halitsever/nest-cloudflare-turnstile
- Owner: halitsever
- License: mit
- Created: 2024-08-26T23:03:09.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-02T08:08:44.000Z (3 months ago)
- Last Synced: 2024-09-28T01:40:58.972Z (about 2 months ago)
- Topics: captcha, cloudflare, integration, nest, turnstile
- Language: TypeScript
- Homepage: https://halitsever.github.io/nest-cloudflare-turnstile
- Size: 660 KB
- Stars: 19
- Watchers: 1
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
☁️ Cloudflare Turnstile integration for NestJS
- 🧩 [**Simple and easy**](#) - This library provides just one guard to protect your endpoints with Cloudflare Turnstile Captcha!
Installation:
```bash
npm install nest-cloudflare-turnstile --save
```add module to imports array:
```javascript
imports: [TurnstileModule.forRoot({
secretKey: '1x0000000000000000000000000000000AA',
tokenResponse: (req) => req.body.turnstileToken // or you can use req.headers.turnstileToken
})],```
use `TurnstileCaptcha` decorator on controller:
```javascript
import { TurnstileCaptcha } from 'nest-cloudflare-turnstile'
@Post()
@TurnstileCaptcha()
getHello(): string {
return this.appService.getHello();
}
```And thats it! For more information, please check the docs
MIT LICENSE | Halit Sever