diff --git a/CHANGELOG.md b/CHANGELOG.md index 74255ce2..618fd9ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,10 @@ published. ### Fixed +- **Insecure base-URL error message is more discoverable (#1303)** — + the rejection now spells out which env var to set (with underscores + visible), notes that loopback hosts are auto-allowed, and shows a + one-line `DEEPSEEK_ALLOW_INSECURE_HTTP=1 deepseek` example. - **Workspace skills survive prompt truncation** — when the skill catalog needs trimming to fit the prompt budget, workspace-local skills now keep precedence over global ones rather than being diff --git a/crates/tui/src/client.rs b/crates/tui/src/client.rs index 54571591..5f2c80fa 100644 --- a/crates/tui/src/client.rs +++ b/crates/tui/src/client.rs @@ -346,9 +346,15 @@ fn validate_base_url_security(base_url: &str) -> Result<()> { if base_url.starts_with("http://") { anyhow::bail!( - "Refusing insecure base URL '{}'. Use HTTPS or set {}=1 to override for trusted environments.", - base_url, - ALLOW_INSECURE_HTTP_ENV + "Refusing insecure base URL '{base_url}'.\n\ + \n\ + Loopback hosts (localhost, 127.0.0.1, [::1]) are auto-allowed.\n\ + For other trusted local hosts (LAN, llama.cpp on a private IP, etc.)\n\ + set the env var `{env}=1` in the shell that runs deepseek and re-run.\n\ + \n\ + Example: `{env}=1 deepseek` (note the underscores).", + base_url = base_url, + env = ALLOW_INSECURE_HTTP_ENV, ); }