discourse/lib/read_only_header.rb
2019-05-06 16:07:49 +02:00

14 lines
240 B
Ruby

# frozen_string_literal: true
module ReadOnlyHeader
def check_readonly_mode
@readonly_mode = Discourse.readonly_mode?
end
def add_readonly_header
response.headers['Discourse-Readonly'] = 'true' if @readonly_mode
end
end