From 011e3840c61a3bbaa4566e82bbbe1de09c7edded Mon Sep 17 00:00:00 2001 From: Klemek Date: Thu, 25 Jun 2026 14:29:09 +0200 Subject: [PATCH] fix: favicon not served from page --- stapler/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stapler/handlers.py b/stapler/handlers.py index 0d958fe..c423965 100644 --- a/stapler/handlers.py +++ b/stapler/handlers.py @@ -596,7 +596,7 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler, BaseHandler): return "" if self.host != self.default_host: if ( - not (self.root_path / page.path / path).is_file() + not (self.root_path / page.path / pathlib.Path(path[1:])).is_file() and path in self.AUTHORIZED_PATHS ): return super().translate_path(path)