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