From 8dd19665b1c22aa4fd32d2242cddc833b5752ffb Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Mon, 24 Sep 2018 21:59:29 +0100 Subject: [PATCH] Only set the host name if configured --- java/server/src/org/openqa/selenium/grid/server/BaseServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/server/src/org/openqa/selenium/grid/server/BaseServer.java b/java/server/src/org/openqa/selenium/grid/server/BaseServer.java index d588bf5370400..a1bc97be4b479 100644 --- a/java/server/src/org/openqa/selenium/grid/server/BaseServer.java +++ b/java/server/src/org/openqa/selenium/grid/server/BaseServer.java @@ -138,7 +138,7 @@ public BaseServer(BaseServerOptions options) { httpConfig.setSecureScheme("https"); ServerConnector http = new ServerConnector(server, new HttpConnectionFactory(httpConfig)); - http.setHost(getUrl().getHost()); + options.getHostname().ifPresent(http::setHost); http.setPort(getUrl().getPort()); http.setIdleTimeout(500000);