Skip to content

Commit

Permalink
Chore: Remove Redis for Rack Attack (#4873)
Browse files Browse the repository at this point in the history
Because:
- It is no longer required
  • Loading branch information
KevinMulhern authored Dec 8, 2024
1 parent f46e583 commit fb46483
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
7 changes: 1 addition & 6 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@
{ "url": "https://github.com/devforce/heroku-buildpack-cleanup" }
],
"addons": [
"heroku-postgresql:mini",
"heroku-redis:mini",
{
"plan": "heroku-redis:minis",
"as": "REDIS_FOR_RACK_ATTACK"
}
"heroku-postgresql:mini"
],
"env": {
"STAGING": {
Expand Down
2 changes: 0 additions & 2 deletions config/initializers/rack_attack.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Rack::Attack
Rack::Attack.enabled = ENV['ENABLE_RACK_ATTACK'] || Rails.env.production?

# Rack::Attack.cache.store = Redis.new(url: ENV['REDIS_FOR_RACK_ATTACK_URL']) if ENV['REDIS_FOR_RACK_ATTACK_URL']

### Throttle Spammy Clients ###
Expand Down
2 changes: 0 additions & 2 deletions env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ GITHUB_SECRET: 1234
GITHUB_WEBHOOK_SECRET: 1234
GOOGLE_CLIENT_ID: 1234
GOOGLE_CLIENT_SECRET: 1234

ENABLE_RACK_ATTACK: 'true'

0 comments on commit fb46483

Please sign in to comment.