diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-25 14:12:24 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-25 14:12:24 +0100 |
commit | e24bfbde1acbef73cd3c58753a572da2bcb59200 (patch) | |
tree | 7d05e3b3ad634f63d1e94de6ebfd16f64cfb9789 /app/controllers | |
parent | 8eeec389c11298ad1be163dd65c5ae79e06867ca (diff) |
Fixing FanOutOnWriteService, fixing Sidekiq not having enough DB connections
in the pool, adding a throttle of 60rpm per IP, adding mini profiler, adding admin status to users
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d83690e1b..d5eaecdb1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,4 +2,11 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception + + # Profiling + before_action do + if current_user && current_user.admin? + Rack::MiniProfiler.authorize_request + end + end end |