mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-30 03:50:13 -05:00
12 lines
345 B
Ruby
12 lines
345 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module AuthorizedFetchHelper
|
||
|
def authorized_fetch_mode?
|
||
|
ENV.fetch('AUTHORIZED_FETCH') { Setting.authorized_fetch } == 'true' || Rails.configuration.x.limited_federation_mode
|
||
|
end
|
||
|
|
||
|
def authorized_fetch_overridden?
|
||
|
ENV.key?('AUTHORIZED_FETCH') || Rails.configuration.x.limited_federation_mode
|
||
|
end
|
||
|
end
|