mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 11:15:14 +08:00
14 lines
240 B
Ruby
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
|