mirror of https://github.com/openspug/spug
U update
parent
a37b736e65
commit
6392b69abf
|
@ -5,7 +5,6 @@ from django.http.response import HttpResponseBadRequest, HttpResponseForbidden,
|
|||
from apps.setting.utils import AppSetting
|
||||
from apps.deploy.models import Deploy, DeployRequest
|
||||
from apps.repository.models import Repository
|
||||
from apps.repository.utils import dispatch as build_dispatch
|
||||
from apps.deploy.utils import dispatch as deploy_dispatch
|
||||
from threading import Thread
|
||||
import hashlib
|
||||
|
|
|
@ -44,5 +44,5 @@ class AuthMiddleware:
|
|||
if user and x_real_ip == user.last_ip and user.token_expired >= time.time() and user.is_active:
|
||||
scope['user'] = user
|
||||
return True, None
|
||||
return False, f'IP verify failed: {x_real_ip} <> {user.last_ip}'
|
||||
return False, f'Verify failed: {x_real_ip} <> {user.last_ip}'
|
||||
return False, 'Token is invalid'
|
||||
|
|
Loading…
Reference in New Issue