mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 01:31:41 +00:00
This commit is contained in:
parent
42e6a0b6eb
commit
b9083c492c
1 changed files with 3 additions and 3 deletions
|
@ -34,13 +34,13 @@ module Api
|
|||
@token ||=
|
||||
begin
|
||||
# Gitlab
|
||||
if request.headers['X-Gitlab-Token']
|
||||
if request.headers['X-Gitlab-Token'].present?
|
||||
request.headers['X-Gitlab-Token']
|
||||
# Github
|
||||
elsif request.headers['X-Hub-Signature-256']
|
||||
elsif request.headers['X-Hub-Signature-256'].present?
|
||||
token_from_signature(request.headers['X_Hub_Signature_256'], 'sha256=')
|
||||
# Gitea
|
||||
elsif 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'
|
||||
|
|
Loading…
Reference in a new issue