bugfix
This commit is contained in:
parent
07b7aa9b1d
commit
038e3cccdf
@ -153,7 +153,7 @@ class ProcessorResource(StaticResource,Url2File):
|
|||||||
return g.myi18n(s,l)
|
return g.myi18n(s,l)
|
||||||
|
|
||||||
def gethost():
|
def gethost():
|
||||||
return '/'.join(request.url.split('/')[:3])
|
return '/'.join(str(request.url).split('/')[:3])
|
||||||
|
|
||||||
async def getArgs():
|
async def getArgs():
|
||||||
ns = DictObject()
|
ns = DictObject()
|
||||||
@ -203,6 +203,10 @@ class ProcessorResource(StaticResource,Url2File):
|
|||||||
processor = Klass(self.abspath(path),self)
|
processor = Klass(self.abspath(path),self)
|
||||||
return await processor.handle(request)
|
return await processor.handle(request)
|
||||||
print(f'path={path} handler by StaticResource..')
|
print(f'path={path} handler by StaticResource..')
|
||||||
|
if self.isFolder(path):
|
||||||
|
config = getConfig()
|
||||||
|
if not config.website.allowListFolder:
|
||||||
|
Raise HTTPNotFound
|
||||||
return await super()._handle(request)
|
return await super()._handle(request)
|
||||||
|
|
||||||
def absUrl(self,request,url):
|
def absUrl(self,request,url):
|
||||||
|
Loading…
Reference in New Issue
Block a user