Skip to content

Commit f47d313

Browse files
committed
Integrate Cloudflare Turnstile for CAPTCHA verification across authentication flows
- Added TurnstileCaptcha component for handling CAPTCHA verification. - Updated login, registration, and account management pages to include CAPTCHA validation. - Implemented rate limiting middleware to prevent abuse on login and registration endpoints. - Refactored Swal import to use dynamic import for better performance. - Enhanced shared links and editor components with improved error handling and user feedback. - Updated environment variable configurations for Turnstile integration. - Added example .env files for frontend and backend services to include new Turnstile and rate limiting settings.
1 parent c3dae3b commit f47d313

43 files changed

Lines changed: 2031 additions & 1130 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Backend/Genai/.env.example

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Google Gemini API
2+
GOOGLE_API_KEY=
3+
GEMINI_MODEL=
4+
GEMINI_MODEL_1=
5+
6+
# JWT Authentication
7+
JWT_SECRET=
8+
9+
# Google reCAPTCHA v3
10+
RECAPTCHA_SECRET_KEY=
11+
RECAPTCHA_MIN_SCORE=0.5
12+
RECAPTCHA_TIMEOUT=3.0
13+
14+
# Redis credentials
15+
REDIS_HOST=
16+
REDIS_PORT=6379
17+
REDIS_PASSWORD=
18+
19+
# Timeout for Gemini streams
20+
STREAM_TIMEOUT_SECONDS=240
21+
22+
# Size limits (bytes)
23+
MAX_DESCRIPTION_BYTES=4096
24+
MAX_CODE_SIZE_BYTES=524288
25+
26+
# CORS allowed origins (comma-separated for exact matches)
27+
ALLOWED_ORIGINS=
28+
29+
# Local development port (optional)
30+
PORT=5001

0 commit comments

Comments
 (0)