Open codedge opened 3 months ago
It looks like we currently don't support passing in a port to --allow-hosts
, but expect the port in the request's Host
header to match the port the server is bound to: https://searchfox.org/mozilla-central/source/testing/webdriver/src/server.rs#339
It seems like that could be broken in some port-forwarding setups, but I'm a bit surprised if it doesn't work when you're matching the ports inside and outside the container.
@codedge could you please check if the workaround @jgraham mentioned works for you temporary?
The only thing that does work is
services:
php:
build: .
ports:
- "9029:80"
webdriver:
image: instrumentisto/geckodriver:latest
command:
- --binary=/opt/firefox/firefox
- --host=0.0.0.0
- --port=80
- --allow-hosts=localhost,webdriver
- --log=debug
ports:
- "80:80"
This way I can whitelist http://webdriver
without port, as 80 is the default for HTTP. If I mix something up here, can you please post a docker-compose config, like mine, with the values you think work better?
It looks like we currently don't support passing in a port to
--allow-hosts
, but expect the port in the request'sHost
header to match the port the server is bound to: https://searchfox.org/mozilla-central/source/testing/webdriver/src/server.rs#339
@jgraham, given that the argument is about the host
and not the port, shouldn't we actually ignore the port? With --allow-origin
we have another argument that is used to prevent connections from unwanted locations and this includes checks for the port. Or do I miss something?
System
I run
geckodriver
in a separate Docker container and want to allow a certain header+port via the--allow-hosts
parameter.Either via docker-compose or directly on the command line, I get the error
I need the port specified inside the
--allow-hosts
, otherwise I getInvalid Host header webdriver:4444
when calling the webdriver container.Any advice?