about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-05-04 01:51:00 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-05-03 18:51:00 +0200
commita7e71bbd08e089938fbf20ddef5768c2f3ee0702 (patch)
tree902cf56459ab2a12f23981aae2ae9af1bc63451a
parentb1d4471e36830aa7dc4425ff6c48035a95c9367a (diff)
Add a missing question mark in rack_attack.rb (#7338)
-rw-r--r--config/initializers/rack_attack.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb
index 310052e9c..0ca0a7e7f 100644
--- a/config/initializers/rack_attack.rb
+++ b/config/initializers/rack_attack.rb
@@ -54,7 +54,7 @@ class Rack::Attack
   end
 
   throttle('throttle_media', limit: 30, period: 30.minutes) do |req|
-    req.authenticated_user_id if req.post? && req.path.start_with('/api/v1/media')
+    req.authenticated_user_id if req.post? && req.path.start_with?('/api/v1/media')
   end
 
   throttle('protected_paths', limit: 25, period: 5.minutes) do |req|