docker run -it --name driver --net test --shm-size=1g --rm zenika/alpine-chrome:with-chromedriver
In another terminal:
docker run -it --rm --net test alpine
apk add --no-cache curl
curl -X POST -d '{"desiredCapabilities":{"goog:chromeOptions":{"args":["--headless","--no-sandbox"]}}}' -H 'Content-Type: application/json' http://driver:9515/session
See error: Host header or origin header is specified and is not whitelisted or localhost.
What is the expected behavior?
Should return a session response like: {"sessionId":"...","status":0,"value":{...}}
What is the actual behavior?
Returns the error message: Host header or origin header is specified and is not whitelisted or localhost.
Possible solution
Use the new options: --allowed-ips= --allowed-origins=*
Logs
Starting ChromeDriver 100.0.4896.60 (6a5d10861ce8de5fce22564658033b43cb7de047-refs/branch-heads/4896@{#875}) on port 9515
All remote connections are allowed. Use an allowlist instead!
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1650499321.128][SEVERE]: Unable find match for host: driver:9515
Describe the bug
Creating a new session produces the error:
Host header or origin header is specified and is not whitelisted or localhost.
To Reproduce Steps to reproduce the behavior:
docker network create test
docker run -it --name driver --net test --shm-size=1g --rm zenika/alpine-chrome:with-chromedriver
docker run -it --rm --net test alpine
apk add --no-cache curl
curl -X POST -d '{"desiredCapabilities":{"goog:chromeOptions":{"args":["--headless","--no-sandbox"]}}}' -H 'Content-Type: application/json' http://driver:9515/session
Host header or origin header is specified and is not whitelisted or localhost.
What is the expected behavior? Should return a session response like:
{"sessionId":"...","status":0,"value":{...}}
What is the actual behavior? Returns the error message:
Host header or origin header is specified and is not whitelisted or localhost.
Possible solution Use the new options:
--allowed-ips= --allowed-origins=*
Logs
Versions