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