7 ms·
Got a good link to something on github that does this? I have to make sure legit bots don't get hit, as a huge percent of our traffic which helps the project s
by bwb 1y ago
Got a good link to something on github that does this?
I have to make sure legit bots don't get hit, as a huge percent of our traffic which helps the project stay active is from google, etc.
- subscribed 1y agoI did it manually and got fail2ban to read the access log anyway. The it's the permanent iptables rule, but could be CF API call as well.
- weaksauce 1y agohere's one example using rack attack on a rails app: https://github.com/pinballmap/pbm/blob/302ac638850711878ac618847b323fa7c2d9e3e3/config/initializers/rack_attack.rb#L27 https://github.com/pinballmap/pbm/blob/302ac638850711878ac61... https://github.com/pinballmap/pbm/blob/302ac638850711878ac618847b323fa7c2d9e3e3/config/robots.production.txt#L63 https://github.com/pinballmap/pbm/blob/302ac638850711878ac61... but it only bans for 3 hours. if they don't respect the hidden link and robots.txt they get banned.