Skip to content

Commit 180e601

Browse files
authored
Merge pull request rails#49374 from yykamei/add_doc_for_protect_from_forgery
Add notice to documentation for protect_from_forgery's :with option
2 parents d7b3951 + f7cc8b3 commit 180e601

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

actionpack/lib/action_controller/metal/request_forgery_protection.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ module ClassMethods
125125
#
126126
# If you need to add verification to the beginning of the callback chain, use <tt>prepend: true</tt>.
127127
# * <tt>:with</tt> - Set the method to handle unverified request.
128+
# Note if <tt>default_protect_from_forgery</tt> is true, Rails call protect_from_forgery with <tt>with :exception</tt>.
128129
#
129130
# Built-in unverified request handling methods are:
130131
# * <tt>:exception</tt> - Raises ActionController::InvalidAuthenticityToken exception.

0 commit comments

Comments
 (0)