Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,16 @@ export async function invokeAxios(
axiosConfig: AxiosRequestConfig,
authOptions: IRequestOptions['auth'] = {},
) {
// axios not apply the http.globalAgent, need set it manually
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manual proxy implementation is incomplete and introduces a regression by ignoring the NO_PROXY environment variable, which is handled by the existing proxy infrastructure. This change forces all requests through the proxy, breaking configurations for internal services.

Prompt for AI agents
Address the following comment on packages/core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts at line 271:

<comment>The manual proxy implementation is incomplete and introduces a regression by ignoring the `NO_PROXY` environment variable, which is handled by the existing proxy infrastructure. This change forces all requests through the proxy, breaking configurations for internal services.</comment>

<file context>
@@ -268,6 +268,16 @@ export async function invokeAxios(
 	axiosConfig: AxiosRequestConfig,
 	authOptions: IRequestOptions[&#39;auth&#39;] = {},
 ) {
+	// axios not apply the http.globalAgent, need set it manually
+	const url = process.env.HTTP_PROXY ?? process.env.HTTPS_PROXY ?? process.env.ALL_PROXY;
+	if (url) {
</file context>
Fix with Cubic

const url = process.env.HTTP_PROXY ?? process.env.HTTPS_PROXY ?? process.env.ALL_PROXY;
if (url) {
const parsedUrl = new URL(url);
axiosConfig.proxy = {
host: parsedUrl.hostname,
port: parseInt(parsedUrl.port) || (parsedUrl.protocol === 'https:' ? 443 : 80),
protocol: parsedUrl.protocol.replace(':', ''),
};
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Proxy Architecture: Conflicting Configuration Logic

Setting axiosConfig.proxy from environment variables conflicts with the existing proxy handling mechanism. The codebase explicitly disables axios's built-in proxy (axios.defaults.proxy = false) and uses custom HTTP/HTTPS agents via setAxiosAgents. The axios request interceptor calls setAxiosAgents(config) without proxy parameters, which will create agents without proxy support, potentially overriding the axiosConfig.proxy setting. This approach contradicts the existing proxy architecture.

Fix in Cursor Fix in Web

try {
return await axios(axiosConfig);
} catch (error) {
Expand Down