Sha256: 2d7265d88235b09f7533888b2aac7f9289882bcb20db157a6f224a1307be3023
Contents?: true
Size: 722 Bytes
Versions: 10
Compression:
Stored size: 722 Bytes
Contents
module Immunio module CsrfHook extend ActiveSupport::Concern included do alias_method_chain :verify_authenticity_token, :immunio if method_defined? :verify_authenticity_token end protected def verify_authenticity_token_with_immunio Request.time "plugin", "#{Module.nesting[0]}::#{__method__}" do Immunio.logger.debug "ActiveSupport checking CSRF token" Immunio.run_hook! "csrf", "framework_csrf_check", valid: verified_request? Request.pause "plugin", "#{Module.nesting[0]}::#{__method__}" do verify_authenticity_token_without_immunio end end end end end ActionController::Base.send :include, Immunio::CsrfHook
Version data entries
10 entries across 10 versions & 1 rubygems