This commit is contained in:
yumoqing 2024-02-18 16:05:40 +08:00
parent 2f098db149
commit bb537a155a
2 changed files with 2 additions and 4 deletions

View File

@ -153,6 +153,7 @@ class TemplateProcessor(BaseProcessor):
class BricksUIProcessor(TemplateProcessor):
@classmethod
def isMe(self,name):
print(f'{name} is a bui")
return name=='bui'
async def datahandle(self, request):

View File

@ -294,18 +294,15 @@ class ProcessorResource(AppLogger, StaticResource,Url2File):
ret = await processor.handle(request)
return ret
f_cnt6 = current_fileno()
if self.request_filename and await self.isHtml(self.request_filename):
return await self.html_handle(request, self.request_filename)
f_cnt7 = current_fileno()
if self.request_filename and os.path.isdir(self.request_filename):
config = getConfig()
if not config.website.allowListFolder:
self.error('%s:not found' % str(request.url))
raise HTTPNotFound
# print(f'{self.request_filename=}, {str(request.url)=}')
f_cnt8 = current_fileno()
print(f'{self.request_filename=}, {str(request.url)=} handle as a normal file')
return await super()._handle(request)
def gethost(self, request):