Skip to content

Commit

Permalink
R2-3031: Adding prepend option to protect_from_forgery to fix csrf er…
Browse files Browse the repository at this point in the history
…ror when using idp
  • Loading branch information
jtoliver-quoin committed Sep 25, 2024
1 parent d993a5d commit c6c6699
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_api_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ApplicationApiController < ActionController::API
before_action :check_config_update_lock!
before_action :set_csrf_cookie, unless: -> { request_from_basic_auth? }

protect_from_forgery with: :exception, if: -> { use_csrf_protection? }
protect_from_forgery with: :exception, prepend: true, if: -> { use_csrf_protection? }

class << self
attr_accessor :model_class
Expand Down

0 comments on commit c6c6699

Please sign in to comment.