From 791bbcf423391392a5c59ec362c067aa87a43d78 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 16 Dec 2021 23:00:15 +0000 Subject: [PATCH] Avoid favicon confusion --- daemon.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/daemon.py b/daemon.py index 9495d9d71..302a681c0 100644 --- a/daemon.py +++ b/daemon.py @@ -13425,18 +13425,19 @@ class PubServer(BaseHTTPRequestHandler): # default newswire favicon, for links to sites which # have no favicon - if 'newswire_favicon.ico' in self.path: - self._getFavicon(callingDomain, self.server.baseDir, - self.server.debug, - 'newswire_favicon.ico') - return + if not self.path.startswith('/favicons/'): + if 'newswire_favicon.ico' in self.path: + self._getFavicon(callingDomain, self.server.baseDir, + self.server.debug, + 'newswire_favicon.ico') + return - # favicon image - if 'favicon.ico' in self.path: - self._getFavicon(callingDomain, self.server.baseDir, - self.server.debug, - 'favicon.ico') - return + # favicon image + if 'favicon.ico' in self.path: + self._getFavicon(callingDomain, self.server.baseDir, + self.server.debug, + 'favicon.ico') + return # check authorization authorized = self._isAuthorized()