Skip to content

Commit

Permalink
Update site.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Jan 6, 2025
1 parent 3ee500d commit 30842a6
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions web/utils/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -1489,13 +1489,14 @@ def setProxy(self, site_name, site_from, to, host, name, open_proxy, open_cors,
return mw.returnData(False, "错误的目标地址!")

# get host from url
try:
if host == "$host":
host_tmp = urlparse(to)
host = host_tmp.netloc

except Exception as e:
return mw.returnData(False, "错误的目标地址")
# try:
# if host == "$host":
# host_tmp = urlparse(to)
# host = host_tmp.netloc

# except Exception as e:
# return mw.returnData(False, "错误的目标地址")
# print(host)

proxy_site_path = self.getProxyDataPath(site_name)
data_content = mw.readFile(proxy_site_path) if os.path.exists(proxy_site_path) else ""
Expand Down

0 comments on commit 30842a6

Please sign in to comment.