Testing
This commit is contained in:
parent
002c17d23d
commit
18fc1f5b16
@ -790,12 +790,15 @@ impl ServiceCollector {
|
|||||||
|
|
||||||
// Extract routing information
|
// Extract routing information
|
||||||
if trimmed.starts_with("return") && trimmed.contains("301") {
|
if trimmed.starts_with("return") && trimmed.contains("301") {
|
||||||
// Redirect: return 301 https://example.com$request_uri;
|
// 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://") {
|
if let Some(url_start) = trimmed.find("https://") {
|
||||||
let url_part = &trimmed[url_start..];
|
let url_part = &trimmed[url_start + 8..]; // Skip "https://"
|
||||||
if let Some(url_end) = url_part.find('$') {
|
if let Some(url_end) = url_part.find('$') {
|
||||||
let redirect_url = &url_part[..url_end];
|
let domain = &url_part[..url_end];
|
||||||
destinations.push(format!("→ {}", redirect_url));
|
destinations.push(format!("→ {}", domain));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if trimmed.starts_with("proxy_pass") {
|
} else if trimmed.starts_with("proxy_pass") {
|
||||||
@ -813,7 +816,7 @@ impl ServiceCollector {
|
|||||||
let path_part = &trimmed[path_start..];
|
let path_part = &trimmed[path_start..];
|
||||||
if let Some(path_end) = path_part.find(';') {
|
if let Some(path_end) = path_part.find(';') {
|
||||||
let root_path = &path_part[..path_end];
|
let root_path = &path_part[..path_end];
|
||||||
destinations.push(format!("📁 {}", root_path));
|
destinations.push(format!("static {}", root_path));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user