From a2d764964731deca29628ec56b8d7b51f374acfd Mon Sep 17 00:00:00 2001 From: BlackDex Date: Mon, 3 Feb 2025 17:03:56 +0100 Subject: [PATCH] Add informational comments to the icon_external function Signed-off-by: BlackDex --- src/api/icons.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/icons.rs b/src/api/icons.rs index fc4e0ccfea..0b437d5332 100644 --- a/src/api/icons.rs +++ b/src/api/icons.rs @@ -63,6 +63,9 @@ static CLIENT: Lazy = Lazy::new(|| { // Build Regex only once since this takes a lot of time. static ICON_SIZE_REGEX: Lazy = Lazy::new(|| Regex::new(r"(?x)(\d+)\D*(\d+)").unwrap()); +// The function name `icon_external` is checked in the `on_response` function in `AppHeaders` +// It is used to prevent sending a specific header which breaks icon downloads. +// If this function needs to be renamed, also adjust the code in `util.rs` #[get("//icon.png")] fn icon_external(domain: &str) -> Option { if !is_valid_domain(domain) {