pet rate limit is now 3/30sec
This commit is contained in:
parent
4acc0e22c8
commit
daf1f140fb
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue