Spaces:
Paused
Paused
Update proxy.py
Browse files
proxy.py
CHANGED
@@ -17,6 +17,7 @@ class ProxyRequestHandler(http.server.SimpleHTTPRequestHandler):
|
|
17 |
if 'Host' in headers:
|
18 |
del headers['Host'] # Remove "Host" header to avoid "HTTP/1.1 400 Bad Request" error
|
19 |
conn = http.client.HTTPConnection('localhost', PROXY_PORT)
|
|
|
20 |
conn.request('GET', url, headers=headers)
|
21 |
response = conn.getresponse()
|
22 |
self.send_response(response.status)
|
|
|
17 |
if 'Host' in headers:
|
18 |
del headers['Host'] # Remove "Host" header to avoid "HTTP/1.1 400 Bad Request" error
|
19 |
conn = http.client.HTTPConnection('localhost', PROXY_PORT)
|
20 |
+
print(headers)
|
21 |
conn.request('GET', url, headers=headers)
|
22 |
response = conn.getresponse()
|
23 |
self.send_response(response.status)
|