From 5609a35f67b0b308523955995fa4e5c066000de3 Mon Sep 17 00:00:00 2001 From: Michael Martello Date: Wed, 8 Apr 2026 03:55:52 +0000 Subject: [PATCH] fix: handle leading-dot NO_PROXY entries matching apex domain `.slack.com` in NO_PROXY should match both `slack.com` (apex) and `wss-primary.slack.com` (subdomain). Strip the leading dot before comparison so the suffix check works for both cases. --- extensions/slack/src/client.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/slack/src/client.ts b/extensions/slack/src/client.ts index 9a53987222a..491fad83823 100644 --- a/extensions/slack/src/client.ts +++ b/extensions/slack/src/client.ts @@ -31,8 +31,10 @@ function isHostExcludedByNoProxy( if (entry === "*") { return true; } - // Exact match or suffix match (with leading dot) - if (lower === entry || lower.endsWith(entry.startsWith(".") ? entry : `.${entry}`)) { + // Strip optional leading dot for comparison so `.slack.com` matches both + // `slack.com` (apex) and `wss-primary.slack.com` (subdomain). + const bare = entry.startsWith(".") ? entry.slice(1) : entry; + if (lower === bare || lower.endsWith(`.${bare}`)) { return true; } }