discourse/app/controllers/forums_controller.rb
Jarek Radosz 5a50f18c0c
DEV: Avoid $ globals (#15453)
Also:
* Remove an unused method (#fill_email)
* Replace a method that was used just once (#generate_username) with `SecureRandom.alphanumeric`
* Remove an obsolete dev puma `tmp/restart` file logic
2022-01-08 23:39:46 +01:00

23 lines
541 B
Ruby

# frozen_string_literal: true
require "read_only_header"
class ForumsController < ActionController::Base
include ReadOnlyHeader
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