mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
mini profiler fix for multisite
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
# If Mini Profiler is included via gem
|
||||
if defined?(Rack::MiniProfiler)
|
||||
|
||||
Rack::MiniProfiler.config.storage_instance = Rack::MiniProfiler::RedisStore.new(connection: DiscourseRedis.new)
|
||||
# note, we may want to add some extra security here that disables mini profiler in a multi hosted env unless user global admin
|
||||
# raw_connection means results are not namespaced
|
||||
#
|
||||
# namespacing gets complex, cause mini profiler is in the rack chain way before multisite
|
||||
Rack::MiniProfiler.config.storage_instance = Rack::MiniProfiler::RedisStore.new(connection: DiscourseRedis.raw_connection)
|
||||
|
||||
# For our app, let's just show mini profiler always, polling is chatty so nuke that
|
||||
Rack::MiniProfiler.config.pre_authorize_cb = lambda do |env|
|
||||
|
||||
Reference in New Issue
Block a user