about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb1
-rw-r--r--config/initializers/rack-mini-profiler.rb6
2 files changed, 7 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
index 1fbd8f7f6..7d6182ecc 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -37,5 +37,6 @@ module Mastodon
     end
 
     config.middleware.use Rack::Attack
+    config.middleware.use Rack::Deflater
   end
 end
diff --git a/config/initializers/rack-mini-profiler.rb b/config/initializers/rack-mini-profiler.rb
new file mode 100644
index 000000000..b1d45e257
--- /dev/null
+++ b/config/initializers/rack-mini-profiler.rb
@@ -0,0 +1,6 @@
+require 'rack-mini-profiler'
+
+Rack::MiniProfilerRails.initialize!(Rails.application)
+
+Rails.application.middleware.delete(Rack::MiniProfiler)
+Rails.application.middleware.insert_after(Rack::Deflater, Rack::MiniProfiler)