GetSiteUrl based on if it's proxy request

This commit is contained in:
shortcutme 2017-05-11 17:57:29 +02:00
parent 487f5cb8c2
commit b5d3995874
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -233,6 +233,12 @@ class UiRequest(object):
return False return False
def renderWrapper(self, site, path, inner_path, title, extra_headers): def renderWrapper(self, site, path, inner_path, title, extra_headers):
def getSiteUrl(self, address):
if self.isProxyRequest():
return "http://zero/" + address
else:
return "/" + address
file_inner_path = inner_path file_inner_path = inner_path
if not file_inner_path: if not file_inner_path:
file_inner_path = "index.html" # If inner path defaults to index.html file_inner_path = "index.html" # If inner path defaults to index.html