Skip to content

Commit b497b49

Browse files
authored
[js] Support Node 17 and above (SeleniumHQ#11262)
1 parent fc4a104 commit b497b49

File tree

1 file changed

+1
-0
lines changed
  • javascript/node/selenium-webdriver/http

1 file changed

+1
-0
lines changed

javascript/node/selenium-webdriver/http/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function getRequestOptions(aUrl) {
5454
options.search = null
5555
options.hash = null
5656
options.path = options.pathname
57+
options.hostname = options.hostname === 'localhost' ? '127.0.0.1' : options.hostname // To support Node 17 and above. Refer https://github.com/nodejs/node/issues/40702 for details.
5758
return options
5859
}
5960

0 commit comments

Comments
 (0)