mirror of https://github.com/mastodon/mastodon
Add `authorized_fetch` server setting in addition to env var (#25798)
parent
6c4c72497a
commit
9e26cd5503
@ -0,0 +1,11 @@
|
||||
# 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
|
Loading…
Reference in New Issue