2017-11-08 23:40:34 -05:00
|
|
|
# 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-18 21:18:04 -05:00
|
|
|
RailsMultisite::Middleware,
|
|
|
|
RailsMultisite::Middleware,
|
2017-11-08 23:40:34 -05:00
|
|
|
RailsMultisite::DiscoursePatches.config
|
|
|
|
)
|
|
|
|
end
|