Rev2154, Fix same origin checking in proxy mode
This commit is contained in:
parent
5a42cb92cd
commit
d281f112d9
2 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.5.6"
|
||||
self.rev = 2153
|
||||
self.rev = 2154
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.config_file = "zeronet.conf"
|
||||
|
|
|
@ -169,7 +169,7 @@ class UiRequest(object):
|
|||
|
||||
def getRequestUrl(self):
|
||||
if self.isProxyRequest():
|
||||
if self.env["PATH_INFO"].startswith("http://zero"):
|
||||
if self.env["PATH_INFO"].startswith("http://zero/"):
|
||||
return self.env["PATH_INFO"]
|
||||
else: # Add http://zero to direct domain access
|
||||
return self.env["PATH_INFO"].replace("http://", "http://zero/", 1)
|
||||
|
@ -178,7 +178,7 @@ class UiRequest(object):
|
|||
|
||||
def getReferer(self):
|
||||
referer = self.env.get("HTTP_REFERER")
|
||||
if referer and self.isProxyRequest() and not referer.startswith("http://zero"):
|
||||
if referer and self.isProxyRequest() and not referer.startswith("http://zero/"):
|
||||
return referer.replace("http://", "http://zero/", 1)
|
||||
else:
|
||||
return referer
|
||||
|
|
Loading…
Reference in a new issue