fix: refresh current favicon aliases

This commit is contained in:
3252a8
2026-06-05 15:47:37 +03:00
parent 1200e8ff70
commit 4b2faa87bb
2 changed files with 25 additions and 2 deletions
+6 -2
View File
@@ -382,11 +382,15 @@ async def webapp_current_favicon_route(request: web.Request) -> web.Response:
favicon_url = _resolve_webapp_favicon_url(settings, _resolve_webapp_logo_url(settings))
digest = _webapp_generated_favicon_digest(favicon_url)
if digest:
return _webapp_favicon_file_response(digest, target_filename)
response = _webapp_favicon_file_response(digest, target_filename)
response.headers["Cache-Control"] = "no-cache"
return response
redirect_url = _webapp_redirectable_favicon_url(favicon_url, target_filename)
if redirect_url:
raise web.HTTPFound(location=redirect_url)
redirect = web.HTTPFound(location=redirect_url)
redirect.headers["Cache-Control"] = "no-cache"
raise redirect
raise web.HTTPNotFound(text="webapp_favicon_not_found")