From ef8ed271d75dd1e4bdf079c11f8bcaf450af25ac Mon Sep 17 00:00:00 2001 From: f Date: Wed, 16 Aug 2023 16:46:11 -0300 Subject: [PATCH] fix: consistencia al llamar a headers --- app/controllers/api/v1/webhooks_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/v1/webhooks_controller.rb b/app/controllers/api/v1/webhooks_controller.rb index 23bfae22..95439cd4 100644 --- a/app/controllers/api/v1/webhooks_controller.rb +++ b/app/controllers/api/v1/webhooks_controller.rb @@ -38,10 +38,10 @@ module Api request.headers['X-Gitlab-Token'] # Github elsif request.headers['X-Hub-Signature-256'].present? - token_from_signature(request.headers['X_Hub_Signature_256'], 'sha256=') + token_from_signature(request.headers['X-Hub-Signature-256'], 'sha256=') # Gitea - elsif request.headers['X_Gitea_Signature'].present? - token_from_signature(request.headers['X_Gitea_Signature']) + elsif request.headers['X-Gitea-Signature'].present? + token_from_signature(request.headers['X-Gitea-Signature']) else raise ActiveRecord::RecordNotFound, 'proveedor no soportado' end