From 7836622cd6519ec7257a2e147af6c4aa8868ba6f Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sun, 24 Nov 2024 17:32:09 +0800 Subject: [PATCH] Update site.py --- web/utils/site.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/web/utils/site.py b/web/utils/site.py index 729bceff4..9efb8d2fb 100644 --- a/web/utils/site.py +++ b/web/utils/site.py @@ -1846,15 +1846,15 @@ location ^~ {from} {\n\ return mw.returnData(False, '检测到您的站点做了301重定向设置,请先关闭重定向!') # 检测存在反向代理 - data_path = self.getProxyDataPath(site_name) - if os.path.exists(data_path): - data_content = mw.readFile(data_path) - data = json.loads(data_content) - for proxy in data: - proxy_dir = "{}/{}".format(self.proxyPath, site_name) - proxy_dir_file = proxy_dir + '/' + proxy['id'] + '.conf' - if os.path.exists(proxy_dir_file): - return mw.returnData(False, '检测到您的站点做了反向代理设置,请先关闭反向代理!') + # data_path = self.getProxyDataPath(site_name) + # if os.path.exists(data_path): + # data_content = mw.readFile(data_path) + # data = json.loads(data_content) + # for proxy in data: + # proxy_dir = "{}/{}".format(self.proxyPath, site_name) + # proxy_dir_file = proxy_dir + '/' + proxy['id'] + '.conf' + # if os.path.exists(proxy_dir_file): + # return mw.returnData(False, '检测到您的站点做了反向代理设置,请先关闭反向代理!') site_info = thisdb.getSitesByName(site_name)