mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
rewrite: more conservative change, only rewrite the X-Forwarded-Proto
header for now, #57
This commit is contained in:
parent
cdb3dcc3d2
commit
78812c8085
@ -75,8 +75,9 @@ class LiveRewriter(object):
|
||||
elif name == 'HTTP_REFERER':
|
||||
continue
|
||||
|
||||
elif name.startswith(('HTTP_X_', 'HTTP_VIA')):
|
||||
continue
|
||||
elif name == 'HTTP_X_FORWARDED_PROTO':
|
||||
name = 'X-Forwarded-Proto'
|
||||
value = splits.scheme
|
||||
|
||||
elif name == 'HTTP_COOKIE':
|
||||
name = 'Cookie'
|
||||
@ -147,8 +148,6 @@ class LiveRewriter(object):
|
||||
else:
|
||||
data = input_
|
||||
|
||||
print(url)
|
||||
print(req_headers)
|
||||
response = requests.request(method=method,
|
||||
url=url,
|
||||
data=data,
|
||||
|
Loading…
x
Reference in New Issue
Block a user