]> cat aescling's git repositories - mastodon.git/commitdiff
Don't rate-limit PuSH endpoints
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 28 Nov 2016 23:44:11 +0000 (00:44 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 28 Nov 2016 23:44:11 +0000 (00:44 +0100)
config/initializers/rack-attack.rb

index 0e96f5381cefb2e17df33f07a2d9f04c6232a23d..3f0ee1d7a1bb0f00fa5477712c72e36640c99398 100644 (file)
@@ -1,7 +1,7 @@
 class Rack::Attack
   # Rate limits for the API
   throttle('api', limit: 150, period: 5.minutes) do |req|
-    req.ip if req.path.match(/\A\/api\//)
+    req.ip if req.path.match(/\A\/api\/v/)
   end
 
   self.throttled_response = lambda do |env|