feat: add ignore_ssl_errors to FetchUrlTool
This commit is contained in:
1 parent
5583132cdc
commit
11f375017a
2 files changed
+7
No files matched your search
@@ -38,6 +38,11 @@ impl McpTool for FetchUrlHandler {
|
|||||||
client_builder = client_builder.user_agent("mcp-memory-server/1.0");
|
client_builder = client_builder.user_agent("mcp-memory-server/1.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Allow bypassing SSL validation for self-signed certificates
|
||||||
|
if req.ignore_ssl_errors.unwrap_or(false) {
|
||||||
|
client_builder = client_builder.danger_accept_invalid_certs(true);
|
||||||
|
}
|
||||||
|
|
||||||
// Reqwest automatically uses HTTP_PROXY, HTTPS_PROXY, NO_PROXY
|
// Reqwest automatically uses HTTP_PROXY, HTTPS_PROXY, NO_PROXY
|
||||||
// environment variables by default, so we don't need to manually
|
// environment variables by default, so we don't need to manually
|
||||||
// extract and apply them, the builder handles it.
|
// extract and apply them, the builder handles it.
|
||||||
|
|||||||
@@ -1041,4 +1041,6 @@ pub struct FetchUrlTool {
|
|||||||
pub url: String,
|
pub url: String,
|
||||||
/// Optional custom user-agent string.
|
/// Optional custom user-agent string.
|
||||||
pub user_agent: Option<String>,
|
pub user_agent: Option<String>,
|
||||||
|
/// Bypass SSL certificate verification for self-signed or invalid certs. Use with caution.
|
||||||
|
pub ignore_ssl_errors: Option<bool>,
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user