mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Allow updates just with auth token
Rails usually requires an additional CSRF protection token but when it's not present we ignore the user's session and use only the OIDC auth token.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
# Controller used to provide the API products for the DFC application
|
||||
module DfcProvider
|
||||
class BaseController < ActionController::Base
|
||||
protect_from_forgery with: :null_session
|
||||
|
||||
rescue_from ActiveRecord::RecordNotFound, with: :not_found
|
||||
|
||||
before_action :check_authorization
|
||||
|
||||
Reference in New Issue
Block a user