Fix cookie domain rewritting
* mandaye/filters/default.py: fix domain replacement
This commit is contained in:
parent
e0c90eec1e
commit
8992e2007d
|
@ -29,7 +29,8 @@ class MandayeFilter(object):
|
|||
src_hostname = re.sub(":\d*$", "", self.env["HTTP_HOST"])
|
||||
for cookie in response.cookies.values():
|
||||
if cookie.has_key('domain'):
|
||||
cookie['domain'] = cookie['domain'].replace(self.target.hostname, src_hostname)
|
||||
cookie['domain'] = re.sub('^\.*%s$' % (self.target.hostname),
|
||||
src_hostname, cookie['domain'])
|
||||
# Modify headers
|
||||
blacklist = ['transfer-encoding', 'content-length']
|
||||
for key, value in response.headers.iteritems():
|
||||
|
|
Reference in New Issue