Add authorized_fetch
server setting in addition to env var (#25798)
This commit is contained in:
parent
6c4c72497a
commit
9e26cd5503
11 changed files with 43 additions and 8 deletions
|
@ -11,6 +11,7 @@ class ApplicationController < ActionController::Base
|
|||
include CacheConcern
|
||||
include DomainControlHelper
|
||||
include DatabaseHelper
|
||||
include AuthorizedFetchHelper
|
||||
|
||||
helper_method :current_account
|
||||
helper_method :current_session
|
||||
|
@ -51,10 +52,6 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
private
|
||||
|
||||
def authorized_fetch_mode?
|
||||
ENV['AUTHORIZED_FETCH'] == 'true' || Rails.configuration.x.limited_federation_mode
|
||||
end
|
||||
|
||||
def public_fetch_mode?
|
||||
!authorized_fetch_mode?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue