跳至內容 跳至搜尋
命名空間
方法
H
N

類別公開方法

new(controller)

# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 253
def initialize(controller)
  @controller = controller
end

實例公開方法

handle_unverified_request()

此方法定義當發現一個驗證失敗的請求時的應用程式行為。

# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 259
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