Sha256: b4cb5f02d036ecd9e21b14e28300d98b8a85b473c2e9a29e5b33b8fa47b429aa
Contents?: true
Size: 511 Bytes
Versions: 3
Compression:
Stored size: 511 Bytes
Contents
module Notable module UnverifiedRequest extend ActiveSupport::Concern included do prepend_before_action :track_unverified_request end def track_unverified_request if !verified_request? expected = form_authenticity_token actual = form_authenticity_param || request.headers["X-CSRF-Token"] Notable.track "Unverified Request", "#{actual || "nil"} != #{expected}" end end end end ActionController::Base.send(:include, Notable::UnverifiedRequest)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
notable-0.2.2 | lib/notable/unverified_request.rb |
notable-0.2.1 | lib/notable/unverified_request.rb |
notable-0.2.0 | lib/notable/unverified_request.rb |