Skip to content

Instantly share code, notes, and snippets.

@gbenedict
Last active April 4, 2017 09:47
Show Gist options
  • Save gbenedict/06271838698075e4a65c26c40d0e2d15 to your computer and use it in GitHub Desktop.
Save gbenedict/06271838698075e4a65c26c40d0e2d15 to your computer and use it in GitHub Desktop.
Modifying the Pow web server to support nip.io in addition to xip.io

The xip.io DNS servers are proving to be troublesome for both latency and reliability. In researching solutions, I found the nip.io DNS servers to be much more reliable.

This modification to add nip.io support is for version 0.5.0 of Pow.

Go to line 78 of the file ~/Library/Application\ Support/Pow/Current/lib/configuration.js:

this.allDomains.push(/\d+\.\d+\.\d+\.\d+\.xip\.io$/, /[0-9a-z]{1,7}\.xip\.io$/);

Duplicate that line and change xip to nip in the new line:

this.allDomains.push(/\d+\.\d+\.\d+\.\d+\.nip\.io$/, /[0-9a-z]{1,7}\.nip\.io$/);

Restart Pow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment