about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-19 14:57:30 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-19 14:57:30 +0100
commite2b846f630cae00096a42dffeff759d0ef8e1c3e (patch)
tree52ed093ba2fa1fe1360efd94f60d3b4c29c8d9fc /config
parent5d72b922715e04f620026598624f6898e0f267c3 (diff)
Adding letter opener for development and Rack::Attack for future rate limiting implementations
Diffstat (limited to 'config')
-rw-r--r--config/application.rb2
-rw-r--r--config/environments/development.rb2
-rw-r--r--config/initializers/rack-attack.rb3
3 files changed, 7 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
index e7634854a..9d8d6022d 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -33,5 +33,7 @@ module Mastodon
       Doorkeeper::AuthorizedApplicationsController.layout 'dashboard'
       Doorkeeper::AuthorizationsController.layout         'auth'
     end
+
+    config.middleware.use Rack::Attack
   end
 end
diff --git a/config/environments/development.rb b/config/environments/development.rb
index b55e2144b..76e52312d 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -38,4 +38,6 @@ Rails.application.configure do
 
   # Raises error for missing translations
   # config.action_view.raise_on_missing_translations = true
+
+  config.action_mailer.delivery_method = :letter_opener
 end
diff --git a/config/initializers/rack-attack.rb b/config/initializers/rack-attack.rb
new file mode 100644
index 000000000..fc2b56c87
--- /dev/null
+++ b/config/initializers/rack-attack.rb
@@ -0,0 +1,3 @@
+class Rack::Attack
+  # TODO
+end