proxy logic
This commit is contained in:
parent
b2550a8c1c
commit
b77e0a11cc
@ -59,9 +59,13 @@ except Exception as e:
|
||||
def get_proxy_url(proxy, current, path):
|
||||
data = {}
|
||||
data["upstream"] = urllib.parse.urljoin(current, path)
|
||||
data["proxy"] = proxy
|
||||
data["proxied"] = True
|
||||
ret = None
|
||||
if proxy is None or proxy_server is None:
|
||||
if proxy is None:
|
||||
data["proxied"] = False
|
||||
else:
|
||||
data["proxy"] = proxy
|
||||
if proxy_server is None:
|
||||
return data["upstream"]
|
||||
presp = requests.post(proxy_server, json=data)
|
||||
return presp.text
|
||||
|
Loading…
Reference in New Issue
Block a user