Change `AUTHORIZED_FETCH` to not block unauthenticated REST API access (#19803)

New environment variable `DISALLOW_UNAUTHENTICATED_API_ACCESS`
lolsob-rspec
Eugen Rochko 2022-11-05 22:56:03 +01:00 committed by GitHub
parent 4c6f7ee8ca
commit b38a465476
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ class Api::BaseController < ApplicationController
end
def disallow_unauthenticated_api_access?
authorized_fetch_mode?
ENV['DISALLOW_UNAUTHENTICATED_API_ACCESS'] == 'true' || Rails.configuration.x.whitelist_mode
end
private