discourse/config/initializers/014-rails_multisite.rb

20 lines
402 B
Ruby
Raw Normal View History

# 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(
2018-01-19 10:18:04 +08:00
RailsMultisite::Middleware,
RailsMultisite::Middleware,
RailsMultisite::DiscoursePatches.config
)
end