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