Expose server_hostname override for verification purposes #367
rb-determined-ai
started this conversation in
Ideas
Replies: 2 comments 5 replies
-
|
So... is this the same as using the IP in the URL, but setting an explicit host header? r = httpx.get("https://10.1.2.3/...", headers={"Host": "example.com"}) |
Beta Was this translation helpful? Give feedback.
5 replies
-
|
@tomchristie would a PR be welcome? I think it seems fairly clear at the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It seems that all of the backends support a
hostnameargument to_open_tcp_stream, and thathostnameis also used as the server_hostname for verification purposes in all cases.It can be really useful to override the server_hostname in enterprise environments where you might be on the private side of a server that has a valid certificate (example.com), but which you can only reach via an internal address (10.1.2.3).
Is there any chance of seeing a feature where the
server_hostnamecan be overridden manually? Ideally it would be nice to have it at thehttpxlevel, even if it was through a custom transport.Beta Was this translation helpful? Give feedback.
All reactions