forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add rails_performance gem and configuration
- Loading branch information
1 parent
e6de978
commit 7a2db25
Showing
4 changed files
with
116 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
require 'rails_performance' | ||
RailsPerformance.setup do |config| | ||
config.redis = Redis::Namespace.new("#{Rails.env}-rails-performance", redis: Rails.cache.redis) | ||
config.duration = 7.days | ||
|
||
config.debug = false # currently not used> | ||
config.enabled = true | ||
|
||
# default path where to mount gem | ||
config.mount_at = '/rails/performance' | ||
|
||
# protect your Performance Dashboard with HTTP BASIC password | ||
config.http_basic_authentication_enabled = false | ||
config.http_basic_authentication_user_name = 'rails_performance' | ||
config.http_basic_authentication_password = 'password12' | ||
|
||
# if you need an additional rules to check user permissions | ||
config.verify_access_proc = proc { |controller| true } | ||
# for example when you have `current_user` | ||
# config.verify_access_proc = proc { |controller| controller.current_user && controller.current_user.admin? } | ||
|
||
# You can ignore endpoints with Rails standard notation controller#action | ||
# config.ignored_endpoints = ['HomeController#contact'] | ||
|
||
# store custom data for the request | ||
# config.custom_data_proc = proc do |env| | ||
# request = Rack::Request.new(env) | ||
# { | ||
# email: request.env['warden'].user&.email, # if you are using Devise for example | ||
# user_agent: request.env['HTTP_USER_AGENT'] | ||
# } | ||
# end | ||
|
||
# config home button link | ||
config.home_link = '/' | ||
config.skipable_rake_tasks = ['webpacker:compile'] | ||
config.include_rake_tasks = false | ||
config.include_custom_events = true | ||
end if defined?(RailsPerformance) |
Oops, something went wrong.