Last active
August 21, 2019 07:49
-
-
Save theredfish/23c1cfebde99ec1d9827184b1fe47495 to your computer and use it in GitHub Desktop.
A reproductible EPROTO error with selenium-webdriver in javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
nginx: | |
build: . | |
restart: always | |
ports: | |
- 80:80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:alpine | |
COPY nginx.conf /etc/nginx/nginx.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webdriver = require("selenium-webdriver"); | |
let driver = new webdriver.Builder() | |
.forBrowser("firefox") | |
.usingServer("https://a-real-selenium-grid/wd/hub") | |
.usingWebDriverProxy("http://localhost:80") | |
.build(); | |
driver.quit(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
events { worker_connections 1024; } | |
http { | |
sendfile on; | |
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
proxy_pass https://a-real-selenium-grid; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment