mirror of https://github.com/jumpserver/jumpserver
commit
13a042bc0f
|
@ -111,12 +111,10 @@ def on_audits_log_create(sender, instance=None, **kwargs):
|
|||
|
||||
def generate_data(username, request):
|
||||
user_agent = request.META.get('HTTP_USER_AGENT', '')
|
||||
|
||||
login_ip = get_request_ip(request) or '0.0.0.0'
|
||||
if isinstance(request, Request):
|
||||
login_ip = request.data.get('remote_addr', '0.0.0.0')
|
||||
login_type = request.data.get('login_type', '')
|
||||
login_type = request.META.get('HTTP_X_JMS_LOGIN_TYPE', '')
|
||||
else:
|
||||
login_ip = get_request_ip(request) or '0.0.0.0'
|
||||
login_type = 'W'
|
||||
|
||||
data = {
|
||||
|
|
Loading…
Reference in New Issue