优化sf获取cnc程序和ftp

This commit is contained in:
jinling.yang
2023-01-09 19:54:02 +08:00
parent c023a13e3a
commit b7723f82d0
24 changed files with 473 additions and 224 deletions

View File

@@ -34,7 +34,7 @@ class Http(models.AbstractModel):
raise AuthenticationError('无效的token')
timestamp_str = int(time.time())
# 设置API接口请求时间,不能超过5秒
deltime = datetime.timedelta(seconds=5)
deltime = datetime.timedelta(seconds=60)
if abs(int(datas['HTTP_TIMESTAMP'])-timestamp_str) > deltime.seconds:
raise AuthenticationError('请求已过期')
# 获得sha1_str加密字符串