Merge commit '8099ba04be
' into kb_migration
This commit is contained in:
commit
70ea37a4cc
302 changed files with 4018 additions and 2611 deletions
|
@ -12,7 +12,6 @@ class Api::BaseController < ApplicationController
|
|||
|
||||
before_action :require_authenticated_user!, if: :disallow_unauthenticated_api_access?
|
||||
before_action :require_not_suspended!
|
||||
before_action :set_cache_control_defaults
|
||||
|
||||
protect_from_forgery with: :null_session
|
||||
|
||||
|
@ -148,10 +147,6 @@ class Api::BaseController < ApplicationController
|
|||
doorkeeper_authorize!(*scopes) if doorkeeper_token
|
||||
end
|
||||
|
||||
def set_cache_control_defaults
|
||||
response.cache_control.replace(private: true, no_store: true)
|
||||
end
|
||||
|
||||
def disallow_unauthenticated_api_access?
|
||||
ENV['DISALLOW_UNAUTHENTICATED_API_ACCESS'] == 'true' || Rails.configuration.x.whitelist_mode
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue