8000 FB-270 Add rack attack to block bots by hrmtl · Pull Request #153 · DFE-Digital/find-a-buying-solution · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

FB-270 Add rack attack to block bots #153

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

Merged
merged 1 commit into from
May 27, 2025
Merged

FB-270 Add rack attack to block bots #153

merged 1 commit into from
May 27, 2025

Conversation

hrmtl
Copy link
Collaborator
@hrmtl hrmtl commented May 23, 2025

JIRA ticket - https://dfedigital.atlassian.net/browse/FB-270

Sometimes we get bots trying to hack into the app by trying common vulnerable endpoints like Wordpress admin urls.

These can quickly generate a large number of errors which get logged in Rollbar and use up all our usage quota.

We could filter these from Rollbar but ideally we should just block bot requests.

This PR

  • adds the rack-attack gem to filter requests at the middleware level
  • blocks obvious bots
  • adds rate limit for all requests

@hrmtl hrmtl force-pushed the FB-270-bot-filtering branch 3 times, most recently from 8dc2de9 to 50677a7 Compare May 23, 2025 12:14
@threedaymonk threedaymonk temporarily deployed to fabs-deploym-fb-270-bot-ys8lk3 May 23, 2025 12:17 Inactive
@hrmtl hrmtl force-pushed the FB-270-bot-filtering branch from 50677a7 to ec3ab48 Compare May 23, 2025 12:19
@threedaymonk threedaymonk temporarily deployed to fabs-deploym-fb-270-bot-ys8lk3 May 23, 2025 12:20 Inactive
@hrmtl hrmtl force-pushed the FB-270-bot-filtering branch from ec3ab48 to a69e44c Compare May 23, 2025 12:26
@threedaymonk threedaymonk temporarily deployed to fabs-deploym-fb-270-bot-ys8lk3 May 23, 2025 12:26 Inactive
Copy link
Collaborator
@threedaymonk threedaymonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. I've used rack-attack in a previous project with good results.

@hrmtl hrmtl merged commit b3a586f into main May 27, 2025
4 checks passed
@hrmtl hrmtl deleted the FB-270-bot-filtering branch May 27, 2025 11:00
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
0