NO_PROXY CIDRs not handled properly #2828
-
Hi,
Here's how
And with that config, here's the
The target IP falls into one of the CIDRs listed in Traceback (most recent call last):
File "/var/lib/juju/agents/unit-test-0/charm/venv/httpx/_transports/default.py", line 63, in map_httpcore_exceptions
yield
File "/var/lib/juju/agents/unit-test-0/charm/venv/httpx/_transports/default.py", line 226, in handle_request
resp = self._pool.handle_request(req)
File "/var/lib/juju/agents/unit-test-0/charm/venv/httpcore/_sync/connection_pool.py", line 262, in handle_request
raise exc
File "/var/lib/juju/agents/unit-test-0/charm/venv/httpcore/_sync/connection_pool.py", line 245, in handle_request
response = connection.handle_request(request)
File "/var/lib/juju/agents/unit-test-0/charm/venv/httpcore/_sync/http_proxy.py", line 285, in handle_request
raise ProxyError(msg)
httpcore.ProxyError: 403 Forbidden If I put I suppose it is a case for an issue. Please let me know if I should go ahead and create one. Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hello, the proxy routing is handled by httpx, so we should first move this to the correct location. |
Beta Was this translation helpful? Give feedback.
-
Hi, indeed this is an issue and it is caused by httpx, thanks @karosis88 @Gmerold. Here is a quick reproducer: If I have the following configuration, where my
I'd expect that IP 10.165.186.46 to be reached directly, as it is part of NO_PROXY's CIDR. However, I can see it hits my proxy instead. I've written a quick change in URLPattern that seems to fix this problem: phvalguima@a90801b |
Beta Was this translation helpful? Give feedback.
-
Answered in #2737. |
Beta Was this translation helpful? Give feedback.
Answered in #2737.