potiuk commented on code in PR #55:
URL: https://github.com/apache/comdev/pull/55#discussion_r4327766814


##########
mcp/ponymail-mcp/index.js:
##########
@@ -43,6 +43,18 @@ import {
 } from "./restrictions.js";
 import { Mail, extractListDomain, countDescendants } from "./mail.js";
 
+// Node's built-in fetch only uses proxy variables when NODE_USE_ENV_PROXY=1
+// is set at startup, so a proxy variable alone would be silently ignored.
+if (
+  ["HTTPS_PROXY", "https_proxy", "HTTP_PROXY", "http_proxy"].some((v) => 
process.env[v]) &&
+  !process.env.NODE_USE_ENV_PROXY
+) {

Review Comment:
   Thanks — checking for Node's `EnvHttpProxyAgent` dispatcher is better than 
my suggestion: it covers `NODE_USE_ENV_PROXY`, `--use-env-proxy` and 
`NODE_OPTIONS` without re-parsing any of them, and the version check handles 
old Node. I pushed d861d27 on top: Node 23 never got env proxy support, so it's 
now excluded from `engines` (`^22.21 || >=24`) and from the upgrade hint, plus 
a comment noting the check relies on an undici-internal global.



##########
mcp/apache-projects-mcp/index.js:
##########
@@ -746,6 +746,18 @@ server.tool(
 // ---------------------------------------------------------------------------
 
 if (process.argv[1] && import.meta.url === 
pathToFileURL(process.argv[1]).href) {
+  // Node's built-in fetch only uses proxy variables when NODE_USE_ENV_PROXY=1
+  // is set at startup, so a proxy variable alone would be silently ignored.
+  if (
+    ["HTTPS_PROXY", "https_proxy", "HTTP_PROXY", "http_proxy"].some((v) => 
process.env[v]) &&
+    !process.env.NODE_USE_ENV_PROXY
+  ) {

Review Comment:
   Same as in ponymail-mcp — addressed by 94252b2, with the Node 23 follow-up 
in d861d27.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to