MicrosoftEdge / EdgeWebDriver

Feedback and discussions about WebDriver for Microsoft Edge
MIT License
55 stars 7 forks source link

msedgedriver 116. Rejecting request with non-local host: 0.0.0.0:58982 #114

Open psichel opened 1 year ago

psichel commented 1 year ago

Starting with msedgedriver and edge 116 our automated tests fail and report an error as follows:

[0-0] 2023-09-07T19:37:08.536Z WARN edgedriver: [1694115428.536][SEVERE]: Rejecting request with non-local host: 0.0.0.0:58982 [0-0] 2023-09-07T19:37:08.540Z WARN webdriver: Request failed with status 500 due to Host header or origin header is specified and is not whitelisted or localhost.

The test scripts and service being connected to are running on localhost so I'm unsure what this means. Note there is no such problem with chromedriver 116, 117, or 118 running in the same environment.

Is there a simple work around or switch to disable this validation? I have tried these options: ['--no-default-browser-check', '--no-first-run', "--allowed-origins=edgedriver", '--remote-allow-origins=', 'whitelisted_ips=', "--allowed-ips=*"],

Thanks

bwalderman commented 9 months ago

Is your request coming from a web page in a browser? This is not usually necessary when using Selenium or other non-browser client.

You might be able to get this working with --allowed-origins=localhost or --allowed-origins=*.