mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 07:51:41 +00:00
fix: llamar a los headers consistentemente
This commit is contained in:
parent
5ef601139f
commit
690efe329c
1 changed files with 4 additions and 4 deletions
|
@ -37,11 +37,11 @@ module Api
|
|||
if request.headers['X-Gitlab-Token']
|
||||
request.headers['X-Gitlab-Token']
|
||||
# Github
|
||||
elsif request.headers['X-HUB-SIGNATURE-256']
|
||||
token_from_signature(request.env['HTTP_X_HUB_SIGNATURE_256'], 'sha256=')
|
||||
elsif request.headers['X-Hub-Signature-256']
|
||||
token_from_signature(request.headers['X_Hub_Signature_256'], 'sha256=')
|
||||
# Gitea
|
||||
elsif request.headers['HTTP_X_GITEA_SIGNATURE']
|
||||
token_from_signature(request.env['HTTP_X_GITEA_SIGNATURE'])
|
||||
elsif request.headers['X_Gitea_Signature']
|
||||
token_from_signature(request.headers['X_Gitea_Signature'])
|
||||
else
|
||||
raise ActiveRecord::RecordNotFound, 'proveedor no soportado'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue