Module: AngularRailsCsrf::Concern
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/angular_rails_csrf/concern.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#request_authenticity_tokens ⇒ Object
23 24 25 |
# File 'lib/angular_rails_csrf/concern.rb', line 23 def request_authenticity_tokens [*super, request.headers['X-XSRF-TOKEN']] end |
#set_xsrf_token_cookie ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/angular_rails_csrf/concern.rb', line 11 def return unless forgery_protection_enabled? config = Rails.application.config = option_from(config, :angular_rails_csrf_cookie_name, 'XSRF-TOKEN') [] = (config) end |