mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 13:36:15 +02:00
Skipped authenticity token for webhook controller
This commit is contained in:
parent
285fa138e6
commit
8ed18ab76e
1 changed files with 2 additions and 1 deletions
|
@ -4,13 +4,14 @@ module Eeid
|
|||
module Webhooks
|
||||
# Controller for handling eeID identification requests webhook
|
||||
class IdentificationRequestsController < ActionController::Base
|
||||
skip_before_action :verify_authenticity_token
|
||||
|
||||
THROTTLED_ACTIONS = %i[create].freeze
|
||||
include Shunter::Integration::Throttle
|
||||
|
||||
rescue_from Shunter::ThrottleError, with: :handle_throttle_error
|
||||
|
||||
# POST /eeid/webhooks/identification_requests
|
||||
|
||||
def create
|
||||
return render_unauthorized unless ip_whitelisted?
|
||||
return render_invalid_signature unless valid_hmac_signature?(request.headers['X-HMAC-Signature'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue