Skip to content
Closed
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
5 changes: 4 additions & 1 deletion src/kimi_cli/utils/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@


def new_client_session() -> aiohttp.ClientSession:
return aiohttp.ClientSession(connector=aiohttp.TCPConnector(ssl=_ssl_context))
return aiohttp.ClientSession(
connector=aiohttp.TCPConnector(ssl=_ssl_context),
trust_env=True,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid proxying loopback requests by default

Setting trust_env=True on the shared new_client_session() makes every HTTP call honor HTTP_PROXY/HTTPS_PROXY, which also affects loopback URLs unless the user has correctly set NO_PROXY. In environments with a proxy configured but no loopback bypass, requests to http://localhost/127.0.0.1 (for example via the web fetch tooling) are now routed to the proxy and fail, whereas they worked before this change. This introduces a regression for local-service workflows; proxy use should be limited to non-loopback targets or explicitly bypass loopback hosts.

Useful? React with 👍 / 👎.

)