MCPcopy
hub / github.com/MikeChongCan/scylla / get_proxy_and_forward

Method get_proxy_and_forward

scylla/proxy/server.py:41–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

39 pass
40
41 def get_proxy_and_forward(self):
42 https = False
43
44 if self.request.uri.startswith('https'):
45 https = True
46
47 disable_forward_proxy = get_config('disable_forward_proxy', default=False)
48
49 if disable_forward_proxy:
50 self.forward()
51 else:
52 proxy = get_proxy(https=https)
53 self.forward(host=proxy.ip, port=proxy.port)
54
55 @web.asynchronous
56 def get(self, *args, **kwargs):

Callers 2

getMethod · 0.95
postMethod · 0.95

Calls 3

forwardMethod · 0.95
get_configFunction · 0.90
get_proxyFunction · 0.85

Tested by

no test coverage detected