authorized_fetch_helper.rb 355 B

1234567891011
  1. # frozen_string_literal: true
  2. module AuthorizedFetchHelper
  3. def authorized_fetch_mode?
  4. ENV.fetch('AUTHORIZED_FETCH') { Setting.authorized_fetch && 'true' } == 'true' || Rails.configuration.x.limited_federation_mode
  5. end
  6. def authorized_fetch_overridden?
  7. ENV.key?('AUTHORIZED_FETCH') || Rails.configuration.x.limited_federation_mode
  8. end
  9. end