diff --git a/agent/src/collectors/service.rs b/agent/src/collectors/service.rs index 4fa1ba0..36fdbe6 100644 --- a/agent/src/collectors/service.rs +++ b/agent/src/collectors/service.rs @@ -790,12 +790,15 @@ impl ServiceCollector { // Extract routing information if trimmed.starts_with("return") && trimmed.contains("301") { - // Redirect: return 301 https://example.com$request_uri; - if let Some(url_start) = trimmed.find("https://") { - let url_part = &trimmed[url_start..]; - if let Some(url_end) = url_part.find('$') { - let redirect_url = &url_part[..url_end]; - destinations.push(format!("→ {}", redirect_url)); + // Skip simple HTTPS redirects (return 301 https://$host$request_uri) + if !trimmed.contains("$host") { + // Meaningful redirect: return 301 https://pages.cmtec.se$request_uri; + if let Some(url_start) = trimmed.find("https://") { + let url_part = &trimmed[url_start + 8..]; // Skip "https://" + if let Some(url_end) = url_part.find('$') { + let domain = &url_part[..url_end]; + destinations.push(format!("→ {}", domain)); + } } } } else if trimmed.starts_with("proxy_pass") { @@ -813,7 +816,7 @@ impl ServiceCollector { let path_part = &trimmed[path_start..]; if let Some(path_end) = path_part.find(';') { let root_path = &path_part[..path_end]; - destinations.push(format!("📁 {}", root_path)); + destinations.push(format!("static {}", root_path)); } } }