mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 04:31:56 +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
|