Skip to content

Commit f1615da

Browse files
committed
fix(mcp-common): enhance UV_INSECURE_HOST initialization for HTTP URLs
- Updated the environment variable initialization logic to set UV_INSECURE_HOST only if the index URL starts with "http://". This change ensures better security practices when configuring the environment for mirror setups.
1 parent cf2818c commit f1615da

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mcp-common/src/mirror.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ impl MirrorConfig {
3838
if std::env::var("PIP_INDEX_URL").is_err() {
3939
std::env::set_var("PIP_INDEX_URL", index_url);
4040
}
41-
if std::env::var("UV_INSECURE_HOST").is_err() {
41+
if std::env::var("UV_INSECURE_HOST").is_err()
42+
&& index_url.starts_with("http://")
43+
{
4244
if let Some(host) = extract_host(index_url) {
4345
std::env::set_var("UV_INSECURE_HOST", &host);
4446
}

mcp-proxy/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "mcp-stdio-proxy"
3-
version = "0.1.49"
3+
# 主入口版本,与 workspace 对外发布版本一致
4+
version = "0.1.50"
45
edition = "2024"
56
authors = ["nuwax-ai"]
67
description = "MCP (Model Context Protocol) proxy server and CLI tool for protocol conversion and remote service access"

0 commit comments

Comments
 (0)