Support header_length in Zeroname plugin
This commit is contained in:
parent
430805adcc
commit
4c8794a4d1
1 changed files with 2 additions and 2 deletions
|
@ -12,14 +12,14 @@ class UiRequestPlugin(object):
|
|||
super(UiRequestPlugin, self).__init__(*args, **kwargs)
|
||||
|
||||
# Media request
|
||||
def actionSiteMedia(self, path):
|
||||
def actionSiteMedia(self, path, header_length=True):
|
||||
match = re.match("/media/(?P<address>[A-Za-z0-9-]+\.[A-Za-z0-9\.-]+)(?P<inner_path>/.*|$)", path)
|
||||
if match: # Its a valid domain, resolve first
|
||||
domain = match.group("address")
|
||||
address = self.site_manager.resolveDomain(domain)
|
||||
if address:
|
||||
path = "/media/" + address + match.group("inner_path")
|
||||
return super(UiRequestPlugin, self).actionSiteMedia(path) # Get the wrapper frame output
|
||||
return super(UiRequestPlugin, self).actionSiteMedia(path, header_length=header_length) # Get the wrapper frame output
|
||||
|
||||
# Is mediarequest allowed from that referer
|
||||
def isMediaRequestAllowed(self, site_address, referer):
|
||||
|
|
Loading…
Reference in a new issue