chore(examples): exclude localhost from proxy bypass list (#3742)

Since Chrome 72 localhost is bypassed by default. Oftentimes
this is not a default behavior in testing scenarios.

Fixes #3711.
This commit is contained in:
Andrey Lushnikov 2019-01-09 17:25:26 -08:00 committed by GitHub
parent 82bef70212
commit 4c48b77503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,11 @@ const puppeteer = require('puppeteer');
// Launch chromium using a proxy server on port 9876. // Launch chromium using a proxy server on port 9876.
// More on proxying: // More on proxying:
// https://www.chromium.org/developers/design-documents/network-settings // https://www.chromium.org/developers/design-documents/network-settings
args: [ '--proxy-server=127.0.0.1:9876' ] args: [
'--proxy-server=127.0.0.1:9876',
// Use proxy for localhost URLs
'--proxy-bypass-list=<-loopback>',
]
}); });
const page = await browser.newPage(); const page = await browser.newPage();
await page.goto('https://google.com'); await page.goto('https://google.com');