Add spam detection and manual review request feature in contact form
- Integrated Gemini AI for spam detection in the contact form API, returning a token for manual review requests if spam is detected. - Implemented a manual review UI in the Form.astro component, allowing users to submit their email and justification for review. - Updated email handler to send manual review requests to a designated email address. - Enhanced rate limiter configuration to allow more attempts in a shorter duration for better user experience. - Added new dependencies: jsonwebtoken and @types/jsonwebtoken for handling JWTs in the spam detection process.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
"@astrolib/analytics": "^0.6.1",
|
||||
"@astrolib/seo": "^1.0.0-beta.8",
|
||||
"@fontsource-variable/inter": "^5.1.1",
|
||||
"@google/generative-ai": "^0.24.1",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"@types/react": "^19.0.10",
|
||||
"@types/react-dom": "^19.0.4",
|
||||
@@ -38,6 +39,7 @@
|
||||
"csrf": "^3.1.0",
|
||||
"dotenv": "^16.4.7",
|
||||
"form-data": "^4.0.2",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"limax": "4.1.0",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"luxon": "^3.6.1",
|
||||
@@ -61,6 +63,7 @@
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"@types/eslint__js": "^8.42.3",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/jsonwebtoken": "^9.0.9",
|
||||
"@types/lodash.merge": "^4.6.9",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
||||
|
Reference in New Issue
Block a user