diff --git a/class/core/site_api.py b/class/core/site_api.py index 31195a867..8bb906b9a 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -1537,7 +1537,8 @@ class site_api: rep = "http(s)?\:\/\/([a-zA-Z0-9][-a-zA-Z0-9]{0,62}\.)+([a-zA-Z0-9][a-zA-Z0-9]{0,62})+.?" if not re.match(rep, _to): return mw.returnJson(False, "错误的目标地址!") - _to = _to.strip("/") + + # _to = _to.strip("/") # get host from url try: if _host == "$host": @@ -1546,9 +1547,10 @@ class site_api: except: return mw.returnJson(False, "错误的目标地址") + # location ~* ^{from}(.*)$ { tpl = """ # PROXY-START/ -location ~* ^{from}(.*)$ { +location ^~ {from} { proxy_pass {to}; proxy_set_header Host {host}; proxy_set_header X-Real-IP $remote_addr;