diff --git a/app/assets/javascripts/pets/bulk.js b/app/assets/javascripts/pets/bulk.js index 98e2e62d..47b83ebf 100644 --- a/app/assets/javascripts/pets/bulk.js +++ b/app/assets/javascripts/pets/bulk.js @@ -115,8 +115,8 @@ var DEBUG = (document.location.search.substr(0, 6) == '?debug'); $(document.body).addClass('js'); bulk_load_queue = new (function BulkLoadQueue() { - var RECENTLY_SENT_INTERVAL_IN_SECONDS = 60; - var RECENTLY_SENT_MAX = 10; + var RECENTLY_SENT_INTERVAL_IN_SECONDS = 30; + var RECENTLY_SENT_MAX = 3; var pets = [], url = form.attr('action') + '.json', recently_sent_count = 0, loading = false; diff --git a/config/initializers/attack.rb b/config/initializers/attack.rb index e402e99e..f470c6ac 100644 --- a/config/initializers/attack.rb +++ b/config/initializers/attack.rb @@ -1,4 +1,4 @@ -Rack::Attack.throttle('pets/ip', limit: 10, period: 1.minute) do |req| +Rack::Attack.throttle('pets/ip', limit: 3, period: 30.seconds) do |req| Rails.logger.debug "Pets hit? #{req.path.inspect} #{req.ip.inspect}" req.ip if req.path.start_with?('/pets/load') end