if user_agent .map(|user_agent| { user_agent.as_str().contains("Safari/") && !user_agent.as_str().contains("Chrome/") && !user_agent.as_str().contains("Chromium/") }) .unwrap_or_default() { Ok( Self::static_asset(Path("/favicon.png".to_string())) .await .into_response(), ) } else { Ok( ( [( header::CONTENT_SECURITY_POLICY, HeaderValue::from_static("default-src 'unsafe-inline'"), )], Self::static_asset(Path("/favicon.svg".to_string())).await?, ) .into_response(), ) } } async fn feed( Extension(page_config): Extension>, Extension(index): Extension>, ) -> ServerResult { let mut builder = rss::ChannelBuilder::default(); let chain = page_config.chain; match chain { Chain::Mainnet => builder.title("Inscriptions".to_string()), _ => builder.title(format!("Inscriptions – {chain:?}")),