Merge pull request #3876 from tchak/flag-dev-tools
Put devtools behind feature flags
This commit is contained in:
commit
d5f54de0a0
4 changed files with 11 additions and 3 deletions
|
@ -24,7 +24,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def authorize_request_for_profiler
|
||||
if administration_signed_in?
|
||||
if Flipflop.mini_profiler_enabled?
|
||||
Rack::MiniProfiler.authorize_request
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
= Gon::Base.render_data(camel_case: true, init: true, nonce: request.content_security_policy_nonce)
|
||||
|
||||
- if Rails.env.development?
|
||||
- if Flipflop.xray_enabled?
|
||||
= stylesheet_link_tag :xray
|
||||
|
||||
%body{ id: content_for(:page_id), class: browser.platform.ios? ? 'ios' : nil }
|
||||
|
@ -39,7 +39,7 @@
|
|||
- if content_for?(:footer)
|
||||
= content_for(:footer)
|
||||
|
||||
- if Rails.env.development?
|
||||
- if Flipflop.xray_enabled?
|
||||
= javascript_include_tag :xray
|
||||
|
||||
= yield :charts_js
|
||||
|
|
|
@ -18,6 +18,13 @@ Flipflop.configure do
|
|||
|
||||
feature :operation_log_serialize_subject
|
||||
|
||||
group :development do
|
||||
feature :mini_profiler_enabled,
|
||||
default: Rails.env.development?
|
||||
feature :xray_enabled,
|
||||
default: Rails.env.development?
|
||||
end
|
||||
|
||||
group :production do
|
||||
feature :remote_storage,
|
||||
default: ENV['FOG_ENABLED'] == 'enabled'
|
||||
|
|
1
config/initializers/rack_mini_profiler.rb
Normal file
1
config/initializers/rack_mini_profiler.rb
Normal file
|
@ -0,0 +1 @@
|
|||
Rack::MiniProfiler.config.authorization_mode = :whitelist
|
Loading…
Reference in a new issue