fix: skip static fast path for all config.website.startswiths prefixes, not just /idfile/
This commit is contained in:
parent
0d53a47e65
commit
0bf82efdd1
@ -210,8 +210,11 @@ class ProcessorResource(StaticResource,Url2File):
|
|||||||
'.svg', '.woff', '.woff2', '.ttf', '.eot', '.map',
|
'.svg', '.woff', '.woff2', '.ttf', '.eot', '.map',
|
||||||
'.webp', '.bmp', '.mp3', '.mp4', '.webm', '.ogg', '.wav')
|
'.webp', '.bmp', '.mp3', '.mp4', '.webm', '.ogg', '.wav')
|
||||||
path_lower = request.path.lower()
|
path_lower = request.path.lower()
|
||||||
# /idfile/ is virtual file storage, not a disk path — skip static fast track
|
if any(path_lower.endswith(ext) for ext in static_exts):
|
||||||
if any(path_lower.endswith(ext) for ext in static_exts) and not path_lower.startswith('/idfile/'):
|
# Skip fast path for virtual path prefixes (startswiths in config)
|
||||||
|
config = getConfig()
|
||||||
|
skip = any(path_lower.startswith(a.leading) for a in (config.website.startswiths or []))
|
||||||
|
if not skip:
|
||||||
self.parse_request(request)
|
self.parse_request(request)
|
||||||
return await super()._handle(request)
|
return await super()._handle(request)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user