2019-05-03 06:21:07 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-05-06 10:07:49 -04:00
|
|
|
module ReadOnlyHeader
|
2019-05-03 06:21:07 -04:00
|
|
|
|
|
|
|
def check_readonly_mode
|
|
|
|
@readonly_mode = Discourse.readonly_mode?
|
|
|
|
end
|
|
|
|
|
|
|
|
def add_readonly_header
|
|
|
|
response.headers['Discourse-Readonly'] = 'true' if @readonly_mode
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|