Sha256: 423851e8b6182570bb3aba068b53378335f0f32672c2512862fc7c7cb5b8af4e
Contents?: true
Size: 536 Bytes
Versions: 2
Compression:
Stored size: 536 Bytes
Contents
module Oxymoron module Concern extend ActiveSupport::Concern included do after_filter :set_xsrf_token_cookie end def set_xsrf_token_cookie cookies['XSRF-TOKEN'] = form_authenticity_token if protect_against_forgery? end def verified_request? if respond_to?(:valid_authenticity_token?, true) super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN']) else super || form_authenticity_token == request.headers['X-XSRF-TOKEN'] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
oxymoron-1.1.9 | lib/oxymoron/concern.rb |
oxymoron-1.1.8 | lib/oxymoron/concern.rb |