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.

NFR: force IP on page.goto

See original GitHub issue

New feature request: force IP on page.goto

In case of blue/green deployment, I would like to test “mywebsite.com” on other IP (next future release is 2.2.2.2).

The dirty hack should edit /etc/hosts

                  +-----------------+
                  |                 |
                  |  mywebsite.com  |
                  |                 |
                  +-----------------+
+-----------+        Production
| Puppeteer |        1.1.1.1
+-----+-----+
      |
      |           +-----------------+
      |           |                 |
      +---------> |  mywebsite.com  |
                  |                 |
                  +-----------------+
                   Future Production
                   2.2.2.2

Example:

let res = await page.gogo("https://mywebsite.com", {ip: "2.2.2.2"});

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

28reactions
benjaminpwarrencommented, Apr 25, 2019

The host-rules argument appears to solve this for me:

const browser = await puppeteer.launch({
  args: [
    '--host-rules=MAP mysite.com.au 123.456.789.012,MAP mysite2.com.au 123.456.789.012'
  ],
  ignoreHTTPSErrors: true
})
3reactions
jotscommented, Jan 23, 2018

This would be super handy for testing site migrations before making the dns change. screenshot pages on the 2 servers and compare them.

Not sure how the proxy solution works, would we need to create a proxy server that knows how to map domains to new IPs? Would be much easier to use the syntax @HanXHX proposes: page.gogo("https://mywebsite.com", {ip: "2.2.2.2"});

Read more comments on GitHub >

github_iconTop Results From Across the Web

Polycom® VBP™ System Configuration Guide - Poly Support
Implementing a DMZ with a Private IP Space . ... this VLAN are necessary go to the “Network” page and modify the “LAN...
Read more >
Watch NFR Live Stream 2022 Online Las Vegas Rodeo in HD
Looking to watch the NFR live stream 2022 online? Guide to watch National Finals Rodeo on Cowboy Channel. Get access the NFR STREAMING...
Read more >
Internet Speed test : Test your broadband connection - nPerf ...
This speed test relies on an exclusive algorithm allowing you to measure accurately download bitrate, upload bitrate and latency of your connection.
Read more >
EUP-233_Access_Router_IPT_DSL_Broadband V8 - Cisco
Latam) NFR Program rewards Cisco Distribution Partners, Direct Partners and ... for the updated standard terms and conditions to enter into force. Page...
Read more >
NF Enterprise 2017 SP9 & Hotfixes | Knowledgebase Home
Go to Hotfix: Hotfix 1 Hotfix 2 Hotfix 3 ... Framework, [2017UI] [NFR] Allow 2017UI pages to show other 2017UI pages inside modals....
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