feat: codeup

pull/360/head
wangzhiqiang 2021-07-28 19:45:34 +08:00 committed by GitHub
parent 47bc85cf28
commit 6fa67120ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,9 @@ def auto_deploy(request, deploy_id, kind):
def _is_valid_token(request):
api_key = AppSetting.get_default('api_key')
token = request.headers.get('X-Gitlab-Token') or request.headers.get('X-Gitee-Token')
token = request.headers.get('X-Gitlab-Token')
token = token or request.headers.get('X-Gitee-Token')
token = token or request.headers.get('X-Codeup-Token')
if token:
return token == api_key
token = request.headers.get('X-Gogs-Signature')