Skip to content
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

Merged
merged 8 commits into from
Nov 7, 2024
Merged

Added cloudflare turnstile #496

merged 8 commits into from
Nov 7, 2024

Conversation

ravirajput10
Copy link
Member

Fixed by: #375

@ravirajput10 ravirajput10 self-assigned this Sep 24, 2024
@@ -0,0 +1,31 @@
const SECRET_KEY = process.env.TURNSTILE_SECRET_KEY;
Copy link
Member

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.

Copy link
Member Author

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);
Copy link
Member

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.

Copy link
Member Author

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

@rajat1saxena
Copy link
Member

@ravirajput10 The code quality checks are failing. Please check.

@rajat1saxena rajat1saxena merged commit 4941341 into main Nov 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants