bugfix
This commit is contained in:
parent
f71e48ca02
commit
3f2ae0dd62
@ -354,16 +354,16 @@ class ProcessorResource(AppLogger, StaticResource,Url2File):
|
|||||||
def entireUrl(self, request, url):
|
def entireUrl(self, request, url):
|
||||||
if url.startswith('http://') or url.startswith('https://'):
|
if url.startswith('http://') or url.startswith('https://'):
|
||||||
return url
|
return url
|
||||||
|
scheme = request.headers.get('X-Forwarded-Scheme') or request.scheme
|
||||||
|
port = request.headers.get('X-Forwarded-Port') or str(request['port'])
|
||||||
h = self.gethost(request)
|
h = self.gethost(request)
|
||||||
if url.startswith('/'):
|
if url.startswith('/'):
|
||||||
return '%s://%s%s' % (request.scheme, h, url)
|
return f'{scheme}://{h}:{port}{url}'
|
||||||
path = request.path
|
path = request.path
|
||||||
if self.request_filename and os.path.isdir(self.request_filename):
|
if self.request_filename and os.path.isdir(self.request_filename):
|
||||||
path = '%s/oops' % path
|
path = '%s/oops' % path
|
||||||
# print(f'entireUrl():{path=}, {url=},{request["request_filename"]=}')
|
|
||||||
p = self.relatedurl(path,url)
|
p = self.relatedurl(path,url)
|
||||||
scheme = request.headers.get('X-Forwarded-Scheme') or request.scheme
|
return f'{scheme}://{h}:{port}{p}'
|
||||||
port = request.headers.get('X-Forwarded-Port') or str(request['port'])
|
|
||||||
return '%s://%s:%s%s' % (scheme, h, port, p)
|
return '%s://%s:%s%s' % (scheme, h, port, p)
|
||||||
|
|
||||||
async def path_call(self, request, path, params={}):
|
async def path_call(self, request, path, params={}):
|
||||||
|
Loading…
Reference in New Issue
Block a user