2023-09-01 13:41:10 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module AuthorizedFetchHelper
|
|
|
|
def authorized_fetch_mode?
|
2023-09-18 07:37:29 +00:00
|
|
|
ENV.fetch('AUTHORIZED_FETCH') { Setting.authorized_fetch && 'true' } == 'true' || Rails.configuration.x.limited_federation_mode
|
2023-09-01 13:41:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def authorized_fetch_overridden?
|
|
|
|
ENV.key?('AUTHORIZED_FETCH') || Rails.configuration.x.limited_federation_mode
|
|
|
|
end
|
|
|
|
end
|