mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 17:24:42 +08:00
20 lines
402 B
Ruby
20 lines
402 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::Middleware,
|
|
RailsMultisite::Middleware,
|
|
RailsMultisite::DiscoursePatches.config
|
|
)
|
|
end
|