🐞 fix: 紧急修复一个严重bug

This commit is contained in:
AdminWhaleFall
2022-04-27 01:36:04 +08:00
parent 65ba68b3bb
commit bd353f8d84
5 changed files with 10 additions and 7 deletions

View File

@@ -58,8 +58,12 @@ class API(BaseModel):
:param API: one API basemodel
:return: API basemodel
"""
if isinstance(self.header, str) and self.header:
if self.header == "":
self.header = {}
self.header['Referer'] = self.url # 增加 Referer
else:
self.header = self.replace_data(self.header, phone)
self.data = self.replace_data(self.data, phone)
self.url = self.replace_data(self.url, phone)
return self