If a direct request reaches a redirect and the next exchange fails at a proxy, inspect the transition. Requests rebuilds proxy-related settings for redirects and may consult the environment again when the Session trusts it.

Mapping valueWhat happens during the merge
NoneThe key is removed, leaving a missing entry that a later pass can fill from the environment.
An empty stringThe explicit value remains; it can preserve direct-routing intent for that scheme.

For an existing Session, supply the destination schemes involved in the direct operation:

response = session.get(
    'https://example.com/start',
    proxies={'http': '', 'https': ''},
    timeout=15,
)

Check additional host-specific mappings and custom adapters if the application supplies them. This routing input does not override every possible policy those components implement.

Keep each URL in the diagnosis

Record the original URL, each redirect location, response status and failing stage. HTTP-to-HTTPS changes the relevant scheme key; a new host may fall outside the first host's bypass rule. A report containing only the initial URL hides both transitions.

Observing one response with redirect following disabled can expose the boundary. Inspect its location as data before deciding to request it; do not indiscriminately send the original credentials to a new destination.

A dedicated Session with environment discovery disabled is another option when the application deliberately owns all routing and trust inputs. That also affects automatic credential and CA discovery, so choose it as an application policy rather than a routine redirect repair.

Tënë sô zo