[Grid] Changing host header before forwarding commands to the driver
Fixes and fixes
ChromeDriver will reject requests if the host header contains something different
than localhost and no whitelistedIps are configured.
This does not affect other drivers.
@@ -61,6 +61,9 @@ protected ProtocolConvertingSession(
@Override
public HttpResponse execute(HttpRequest req) {
+ String host = "host";
+ req.removeHeader(host);
+ req.addHeader(host, String.format("%s:%s", getUri().getHost(), getUri().getPort()));
HttpResponse res = handler.execute(req);
if (req.getMethod() == DELETE && killUrl.equals(req.getUri())) {
stop();
