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