命名空间
- 类 ActionController::RequestForgeryProtection::ProtectionMethods::NullSession::NullCookieJar
- 类 ActionController::RequestForgeryProtection::ProtectionMethods::NullSession::NullSessionHash
方法
类公共方法
new(controller) 链接
来源: 显示 | 在 GitHub 上
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 262 def initialize(controller) @controller = controller end
实例公共方法
handle_unverified_request() 链接
当发现请求未经验证时,此方法定义了应用程序的行为。
来源: 显示 | 在 GitHub 上
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 268 def handle_unverified_request request = @controller.request request.session = NullSessionHash.new(request) request.flash = nil request.session_options = { skip: true } request.cookie_jar = NullCookieJar.build(request, {}) end