New issue
Advanced search Search tips

Issue 798793 link

Starred by 4 users

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Add support for "--host-rules" argument in headless mode

Reported by stephan....@gmail.com, Jan 3 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce the problem:
Launch chrome in headless mode and specify a host-rule to map every host to 127.0.0.1:
  chrome --headless --host-rules='MAP * 127.0.0.1' https://www.example.org

Alternative: Use puppeteer and specify a host-rule:
require('puppeteer');
async function run() {
  a = [
    "--host-rules='MAP * 127.0.0.1'",
    '--no-sandbox',
  ];
  const browser = await puppeteer.launch({args: a});
  const page = await browser.newPage();
  await page.goto('http://www.example.org');
  console.log(await page.content());
  browser.close();
}
run();

What is the expected behavior?
chrome attempts to retrieve www.example.org from 127.0.0.1.

What went wrong?
chrome ignores the host-rule and contacts the IP that ww.example.org resolves to (93.184.216.34).

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 63.0.3239.84  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: 

Filed an issue with puppeteer as well:
https://github.com/GoogleChrome/puppeteer/issues/1701
 
Components: Internals>Headless
Labels: Needs-Triage-M63
Status: Available (was: Unconfirmed)
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 16 (6 days ago)

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment