1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-27 22:38:42 +09:00

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

New environment variable `DISALLOW_UNAUTHENTICATED_API_ACCESS`
This commit is contained in:
Eugen Rochko 2022-11-05 22:56:03 +01:00 committed by GitHub
parent d0c9ac3919
commit 3a41fccc43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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