mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
add Strict-Transport-Security to list of http response headers to swallow, to avoid some problems with HSTS when browsing through warcprox (doesn't solve the case of preloaded HSTS though)
This commit is contained in:
parent
6f10e2708d
commit
0809c78486
2
setup.py
2
setup.py
@ -50,7 +50,7 @@ except:
|
||||
deps.append('futures')
|
||||
|
||||
setuptools.setup(name='warcprox',
|
||||
version='2.0.dev6',
|
||||
version='2.0.dev7',
|
||||
description='WARC writing MITM HTTP/S proxy',
|
||||
url='https://github.com/internetarchive/warcprox',
|
||||
author='Noah Levitt',
|
||||
|
@ -147,8 +147,10 @@ class ProxyingRecordingHTTPResponse(http_client.HTTPResponse):
|
||||
|
||||
status_and_headers = 'HTTP/1.1 {} {}\r\n'.format(self.status, self.reason)
|
||||
for k,v in self.msg.items():
|
||||
if k.lower() not in ('connection', 'proxy-connection', 'keep-alive',
|
||||
'proxy-authenticate', 'proxy-authorization', 'upgrade'):
|
||||
if k.lower() not in (
|
||||
'connection', 'proxy-connection', 'keep-alive',
|
||||
'proxy-authenticate', 'proxy-authorization', 'upgrade',
|
||||
'strict-transport-security'):
|
||||
status_and_headers += '{}: {}\r\n'.format(k, v)
|
||||
status_and_headers += 'Connection: close\r\n\r\n'
|
||||
self.proxy_dest.sendall(status_and_headers.encode('latin1'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user