From 3b9eaedb337a8e10c5d0060117c676d677fe16b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Fri, 8 May 2026 20:54:38 +0200 Subject: [PATCH] favicons --- pytorrent/routes/main.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pytorrent/routes/main.py b/pytorrent/routes/main.py index 3d6432d..0d66e30 100644 --- a/pytorrent/routes/main.py +++ b/pytorrent/routes/main.py @@ -13,6 +13,17 @@ def _asset_url(key: str) -> str: return path if path.startswith("http") else url_for("static", filename=path) +@app.get("/favicon.ico") +def favicon_ico(): + response = send_from_directory( + current_app.static_folder, + "favicon.svg", + mimetype="image/svg+xml", + max_age=86400, + ) + response.headers["Cache-Control"] = "public, max-age=86400" + return response + @bp.route("/login", methods=["GET", "POST"]) def login():