-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added cloudflare turnstile #496
Conversation
@@ -0,0 +1,31 @@ | |||
const SECRET_KEY = process.env.TURNSTILE_SECRET_KEY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this file's code to apps/web/app/api/cloudflare
route handler as a private function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the code
return true; | ||
} | ||
// eslint-disable-next-line no-console | ||
console.log(`Turnstile validation failed`, outcome); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log this to the database Log
collection as an error using Logger (from /apps/web/services/logger.ts
) utility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logged the error in the DB's log collection
@ravirajput10 The code quality checks are failing. Please check. |
Fixed by: #375