mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 12:31:42 +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']
|
if request.headers['X-Gitlab-Token']
|
||||||
request.headers['X-Gitlab-Token']
|
request.headers['X-Gitlab-Token']
|
||||||
# Github
|
# Github
|
||||||
elsif request.headers['X-HUB-SIGNATURE-256']
|
elsif request.headers['X-Hub-Signature-256']
|
||||||
token_from_signature(request.env['HTTP_X_HUB_SIGNATURE_256'], 'sha256=')
|
token_from_signature(request.headers['X_Hub_Signature_256'], 'sha256=')
|
||||||
# Gitea
|
# Gitea
|
||||||
elsif request.headers['HTTP_X_GITEA_SIGNATURE']
|
elsif request.headers['X_Gitea_Signature']
|
||||||
token_from_signature(request.env['HTTP_X_GITEA_SIGNATURE'])
|
token_from_signature(request.headers['X_Gitea_Signature'])
|
||||||
else
|
else
|
||||||
raise ActiveRecord::RecordNotFound, 'proveedor no soportado'
|
raise ActiveRecord::RecordNotFound, 'proveedor no soportado'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue