question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

host-rules ignored

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 0.13.0
  • Platform / OS version: Debian Stretch 9.2
  • Node.js version: 8.9.3

What steps will reproduce the problem?

const puppeteer = 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 result? I expected 127.0.0.1 to be contacted for the web page and then an HTTP 404 error (I am not running a web server on localhost).

What happens instead? Retrieves the web page from www.example.org and prints HTML on the console.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
JoelEinbindercommented, Jan 1, 2018

Remove the quotes:

  a = [
    "--host-rules=MAP * 127.0.0.1",
    '--no-sandbox',
  ];
Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle and ignoring a repository via hostRules #12901 - GitHub
Ok, I was trying to match on the gradle manager (e.g. "matchManagers": ["gradle"] ) but when I switched it to "matchDatasources": ["maven"] it ......
Read more >
Configuration Options - Renovate Docs
A list of HTTP status codes safe to ignore even when abortOnError=true . Name, Value. type, array. subType, number. parent, hostRules. This ...
Read more >
renovatebot/renovate - docker.md - Sourcegraph
Add all paths to ignore into the `ignorePaths` configuration field. ... https://docs.renovatebot.com/configuration-options/#hostrules) for more information.
Read more >
Supported Command Line Switches - Electron
Like --host-rules but these rules only apply to the host resolver. ... Ignore the connections limit for domains list separated by , ....
Read more >
UrlMap.Builder (Google Cloud 0.90.0-alpha API)
The list of HostRules to use against the URL. ... This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found