discourse/config/initializers/014-rails_multisite.rb
Sam 86e6732f78 FEATURE: update rails multisite
always allow /srv/status through even if host does not match
2017-11-09 15:40:56 +11:00

20 lines
422 B
Ruby

# frozen_string_literal: true
class RailsMultisite::DiscoursePatches
def self.config
{
db_lookup: lambda do |env|
env["PATH_INFO"] == "/srv/status" ? "default" : nil
end
}
end
end
if Rails.configuration.multisite
Rails.configuration.middleware.swap(
RailsMultisite::ConnectionManagement,
RailsMultisite::ConnectionManagement,
RailsMultisite::DiscoursePatches.config
)
end