From 4c48b77503112c876fc5f907888f5a91a2095aff Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 9 Jan 2019 17:25:26 -0800 Subject: [PATCH] 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. --- examples/proxy.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/proxy.js b/examples/proxy.js index 6ff63d1f..210b7253 100644 --- a/examples/proxy.js +++ b/examples/proxy.js @@ -23,7 +23,11 @@ const puppeteer = require('puppeteer'); // Launch chromium using a proxy server on port 9876. // More on proxying: // 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(); await page.goto('https://google.com');