instance method
protect_against_forgery?
Ruby on Rails 7.2.3
Since v2.2.3 PrivateSignature
protect_against_forgery?()
Checks if the controller allows forgery protection.
Source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 612
def protect_against_forgery? # :doc:
allow_forgery_protection && (!session.respond_to?(:enabled?) || session.enabled?)
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 612
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection