mirror of https://gitlab.com/bashrc2/epicyon
Simplify
parent
428fb88f2c
commit
c62223815b
|
@ -4837,18 +4837,17 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
def _getFavicon(self, callingDomain: str,
|
def _getFavicon(self, callingDomain: str,
|
||||||
baseDir: str, debug: bool,
|
baseDir: str, debug: bool,
|
||||||
favFile='favicon.ico') -> None:
|
favFilename: str) -> None:
|
||||||
"""Return the site favicon or default newswire favicon
|
"""Return the site favicon or default newswire favicon
|
||||||
"""
|
"""
|
||||||
favType = 'image/x-icon'
|
favType = 'image/x-icon'
|
||||||
favFilename = favFile
|
|
||||||
if self._hasAccept(callingDomain):
|
if self._hasAccept(callingDomain):
|
||||||
if 'image/webp' in self.headers['Accept']:
|
if 'image/webp' in self.headers['Accept']:
|
||||||
favType = 'image/webp'
|
favType = 'image/webp'
|
||||||
favFilename = favFile.split('.')[0] + '.webp'
|
favFilename = favFilename.split('.')[0] + '.webp'
|
||||||
if 'image/avif' in self.headers['Accept']:
|
if 'image/avif' in self.headers['Accept']:
|
||||||
favType = 'image/avif'
|
favType = 'image/avif'
|
||||||
favFilename = favFile.split('.')[0] + '.avif'
|
favFilename = favFilename.split('.')[0] + '.avif'
|
||||||
if not self.server.themeName:
|
if not self.server.themeName:
|
||||||
self.themeName = getConfigParam(baseDir, 'theme')
|
self.themeName = getConfigParam(baseDir, 'theme')
|
||||||
if not self.server.themeName:
|
if not self.server.themeName:
|
||||||
|
|
Loading…
Reference in New Issue