fab7d338 by 周伟奇

Merge branch 'feature/pentest'

2 parents bde59c0a 0677013d
...@@ -26,7 +26,7 @@ class LoginView(ObtainJSONWebToken, GenericView): ...@@ -26,7 +26,7 @@ class LoginView(ObtainJSONWebToken, GenericView):
26 26
27 def post(self, request, *args, **kwargs): 27 def post(self, request, *args, **kwargs):
28 # 登录次数限制 28 # 登录次数限制
29 remote_ip = request.META.get('HTTP_REMOTEIP', '') 29 remote_ip = request.META.get('HTTP_X_REAL_IP', '')
30 user_name = request.data.get('username', '') 30 user_name = request.data.get('username', '')
31 times = rh.get_login_times(remote_ip) 31 times = rh.get_login_times(remote_ip)
32 if isinstance(times, int) and times >= LOGIN_TIMES_LIMIT: 32 if isinstance(times, int) and times >= LOGIN_TIMES_LIMIT:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!