Skip to content

Commit

Permalink
Changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeeky committed Oct 7, 2022
1 parent b43d752 commit 04ee73b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion plugins/IProxyPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
'override_host_header' : 'X-Proxy2-Override-Host-Header',
'domain_front_host_header' : 'X-Proxy2-Domain-Front-Host-Header',
'keep_alive_this_connection' : 'X-Proxy2-Keep-Alive',
'remove_response_headers' : 'X-Proxy2-Remove-Response-Headers',
}

class DropConnectionException(Exception):
Expand Down
5 changes: 3 additions & 2 deletions plugins/malleable_redirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,11 +1193,12 @@ def _response_handler(self, req, req_body, res, res_body):
hdrs = ''

for h in self.proxyOptions['remove_these_response_headers']:
if h in res.headers:
if h in res.headers.keys():
del res.headers[h]
hdrs += h + ', '

self.logger.dbg('Removed these response headers: ' + hdrs)
if len(hdrs) > 0:
self.logger.dbg('Removed these response headers: ' + hdrs)

req.connection.no_keep_alive = False

Expand Down

0 comments on commit 04ee73b

Please sign in to comment.