mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-18 00:03:11 +00:00
fix: keep resolved mcp secrets out of header warnings and userinfo urls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
aba65c8d23
commit
6d0fd3be83
@@ -66,7 +66,11 @@ impl McpClient {
|
||||
)
|
||||
})?;
|
||||
|
||||
let parsed_url = reqwest::Url::parse(&resource.url).context("Invalid MCP server URL")?;
|
||||
let mut parsed_url =
|
||||
reqwest::Url::parse(&resource.url).context("Invalid MCP server URL")?;
|
||||
// reqwest moves userinfo to a header, so its errors print the URL without it.
|
||||
let _ = parsed_url.set_username("");
|
||||
let _ = parsed_url.set_password(None);
|
||||
let server_url = ServerUrl {
|
||||
full: parsed_url.to_string(),
|
||||
origin: parsed_url.origin().ascii_serialization(),
|
||||
@@ -90,7 +94,8 @@ impl McpClient {
|
||||
headers.insert(name, value);
|
||||
}
|
||||
_ => {
|
||||
tracing::warn!("Invalid header: {}={}", key, value);
|
||||
// The value may be a resolved secret: name the header only.
|
||||
tracing::warn!("Invalid header: {}", key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user