我想实施 Basic Http Authentication 在里面 Selenium Grid 我该怎么做?例如:我想向网格发送请求,但不能在URL中没有身份验证。我需要创造这样的东西 http://username:password@mygrid.com:4444/wd/hub 在我们的内部硒网格中。我该怎么做?
Basic Http Authentication
Selenium Grid
好啊我能够实现我所需要的。我已安装 nginx 并添加了 selenium 它的网格端点。然后添加
nginx
selenium
auth_basic âGridâs Areaâ; auth_basic_user_file /etc/apache2/.htpasswd;
在 nginx.conf . 就是这样。
nginx.conf
请记住网格有多个 URI 而且没有任何 root (英寸 nginx公司 术语)URI。所以当你代理的时候 /grid 到 http://localhost:4444/grid/console 无法提供所有静态内容。在这种情况下,我们需要代理 / 到 http://localhost:4001 . 这是因为静态内容是从不同的 URI . 在我们的情况下,它是从 /grid/resources/org/openqa/grid/images/ 这与 /grid/console .
URI
root
nginx公司
/grid
http://localhost:4444/grid/console
/
http://localhost:4001
/grid/resources/org/openqa/grid/images/
/grid/console
到目前为止 SSL 工作我跟随 this 导游,非常简单。
SSL