Skip to content

Commit 96c4ecd

Browse files
committed
[java] allow origins for geckodriver of localhost and 127.0.0.1
1 parent af12e43 commit 96c4ecd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/src/org/openqa/selenium/firefox/GeckoDriverService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ protected List<String> createArgs() {
190190
int wsPort = PortProber.findFreePort();
191191
args.add(String.format("--port=%d", getPort()));
192192
args.add(String.format("--websocket-port=%d", wsPort));
193-
args.add(String.format("--allow-origins=http://localhost:%d", wsPort));
193+
args.add("--allow-origins");
194+
args.add(String.format("http://127.0.0.1:%d", wsPort));
195+
args.add(String.format("http://localhost:%d", wsPort));
194196
if (firefoxBinary != null) {
195197
args.add("-b");
196198
args.add(firefoxBinary.getPath());

0 commit comments

Comments
 (0)