API V1 skip authenticity token validation (#18142)
* Skip authenticity token on API V1 * Test execution experiment - should fail * Fix specs test * Remove listings v1 controller before_action hook
This commit is contained in:
parent
41f4d6d393
commit
0d942e6161
2 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,8 @@ module Api
|
|||
|
||||
self.api_action = true
|
||||
|
||||
skip_before_action :verify_authenticity_token
|
||||
|
||||
rescue_from ActionController::ParameterMissing do |exc|
|
||||
error_unprocessable_entity(exc.message)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ module Api
|
|||
before_action :authenticate!
|
||||
before_action :set_cache_control_headers, only: %i[index show]
|
||||
before_action :set_and_authorize_listing, only: %i[update]
|
||||
skip_before_action :verify_authenticity_token, only: %i[create update]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue