diff --git a/fir_client/src/components/FirAppInfostimeline.vue b/fir_client/src/components/FirAppInfostimeline.vue index 6ebb911..143c6a3 100644 --- a/fir_client/src/components/FirAppInfostimeline.vue +++ b/fir_client/src/components/FirAppInfostimeline.vue @@ -141,7 +141,8 @@ 'token': app.download_token, 'short': this.currentapp.short, 'release_id': app.release_id, - "isdownload": true + "password": this.currentapp.password, + "isdownload": true, }, 'app_id': this.currentapp.app_id }) diff --git a/fir_ser/api/views/download.py b/fir_ser/api/views/download.py index 0735c1f..710cfe2 100644 --- a/fir_ser/api/views/download.py +++ b/fir_ser/api/views/download.py @@ -132,7 +132,8 @@ class ShortDownloadView(APIView): udid = time if not udid: udid = "" - logging.info("make cache_response release_id:%s udid:%s" % (release_id, udid)) + logging.info( + "get or make cache_response short:%s release_id:%s udid:%s" % (kwargs.get("short", ''), release_id, udid)) return "_".join( [settings.CACHE_KEY_TEMPLATE.get("download_short_key"), kwargs.get("short", ''), release_id, udid]) @@ -174,6 +175,11 @@ class InstallView(APIView): res.data = {"download_url": download_url} if download_url != "" and "mobileconifg" not in download_url: set_app_download_by_cache(app_id) + if request.META.get('HTTP_X_FORWARDED_FOR',None): + ip = request.META['HTTP_X_FORWARDED_FOR'] + else: + ip = request.META['REMOTE_ADDR'] + logger.info("remote ip %s short %s download_url %s app_obj %s" % (ip, short, download_url, app_obj)) return Response(res.dict) else: res.code = 1004 diff --git a/fir_ser/api/views/login.py b/fir_ser/api/views/login.py index a25dc8c..05cea26 100644 --- a/fir_ser/api/views/login.py +++ b/fir_ser/api/views/login.py @@ -70,6 +70,7 @@ class LoginView(APIView): response.code = 1003 else: response.code = 1006 + logger.error("username:%s failed too try , locked" % (username,)) response.msg = "用户登录失败次数过多,已被锁定,请1小时之后再次尝试" else: response.code = 1001