2018-01-15 09:43:26 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-05-06 22:07:49 +08:00
|
|
|
require "read_only_header"
|
2019-05-03 18:21:07 +08:00
|
|
|
|
2019-01-21 14:37:04 +08:00
|
|
|
class ForumsController < ActionController::Base
|
2019-05-06 22:07:49 +08:00
|
|
|
include ReadOnlyHeader
|
2019-05-03 18:21:07 +08:00
|
|
|
|
|
|
|
before_action :check_readonly_mode
|
|
|
|
after_action :add_readonly_header
|
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
def status
|
2021-03-15 12:41:59 +08:00
|
|
|
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
|
|
|
|
|
2022-01-09 06:39:46 +08:00
|
|
|
render plain: "ok"
|
2013-02-06 03:16:51 +08:00
|
|
|
end
|
|
|
|
end
|