-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Closed
Copy link
Labels
Description
Feature and motivation
In RemoteConnection, the get_remote_connection_headers method has a set of logical defaults it builds, but there's no way for a user to make an addition to these headers.
Adding a hook or property that the consuming code can set to add to these headers would be a big help.
Usage example
I need to add a host header for requests to be successful to my selenium grid running behind traefik reverse proxy. Without this feature, I can't use selenium python out of the box to create sessions (initializing WebDriver throws 404 errors because traefik doesn't know where to route without the host header).
Passing a parameter from WebDriver to RemoteConnection ought to do the trick:
driver = WebDriver(command_executor, additional_headers={"Host": "some-value"})d-ganchar, itsjwala, Lukas-Les and JuergenLandt