Skip to content

Commit 1b2f173

Browse files
committed
Fix loading ActionMailbox::BaseController when CSRF protection is disabled
When `default_protect_from_forgery` is false, `verify_authenticity_token` callback does not define and `skip_forgery_protection` raise exception. Fixes rails#34837.
1 parent 5963b3d commit 1b2f173

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actionmailbox/app/controllers/action_mailbox/base_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module ActionMailbox
44
# The base class for all Action Mailbox ingress controllers.
55
class BaseController < ActionController::Base
6-
skip_forgery_protection
6+
skip_forgery_protection if default_protect_from_forgery
77

88
before_action :ensure_configured
99

0 commit comments

Comments
 (0)