mrs为名的更改为sf
This commit is contained in:
@@ -13,16 +13,16 @@ class Common(models.Model):
|
||||
|
||||
|
||||
|
||||
def get_headers(self,token,mrs_secret_key):
|
||||
def get_headers(self,token, secret_key):
|
||||
'''
|
||||
获取requests中的heardes参数
|
||||
'''
|
||||
timestamp = int(time.time())
|
||||
check_str = '%s%s%s' % (token, timestamp, mrs_secret_key)
|
||||
check_mrs_str = hashlib.sha1(check_str.encode('utf-8')).hexdigest()
|
||||
check_str = '%s%s%s' % (token, timestamp, secret_key)
|
||||
check_sf_str = hashlib.sha1(check_str.encode('utf-8')).hexdigest()
|
||||
headers = {'TOKEN': token,
|
||||
'TIMESTAMP': str(timestamp),
|
||||
'checkstr': check_mrs_str}
|
||||
'checkstr': check_sf_str}
|
||||
return headers
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user