mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
23 lines
538 B
Ruby
23 lines
538 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "read_only_mixin"
|
|
|
|
class ForumsController < ActionController::Base
|
|
include ReadOnlyMixin
|
|
|
|
before_action :check_readonly_mode
|
|
after_action :add_readonly_header
|
|
|
|
def status
|
|
if params[:cluster]
|
|
if GlobalSetting.cluster_name.nil?
|
|
return render plain: "cluster name not configured", status: 500
|
|
elsif GlobalSetting.cluster_name != params[:cluster]
|
|
return render plain: "cluster name does not match", status: 500
|
|
end
|
|
end
|
|
|
|
render plain: "ok"
|
|
end
|
|
end
|