Skip to content

fix: assert localhost when server address doesnt match. fixes #131#132

Merged
shellscape merged 1 commit intomasterfrom
fix/address-localhost
May 4, 2019
Merged

fix: assert localhost when server address doesnt match. fixes #131#132
shellscape merged 1 commit intomasterfrom
fix/address-localhost

Conversation

@shellscape
Copy link
Owner

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • metadata

Breaking Changes?

  • yes
  • no

If yes, please describe the breakage.

There is potential for breakage if users were performing checks to work around this issue, or were expecting the incorrect address in an event hook.

Please Describe Your Changes

#131 outlines a problem whereby localhost is rewritten to 127.0.0.1 after the server has been started and reports the address. That address is used to construct the URI for both console output and the open feature. In the referenced issue's case, a whitelist was being used and 127.0.0.1 was not on that list. The mismatch was unexpected.

This commit catches that discrepancy and rewrites the hostname portion of the url data to localhost.

@shellscape shellscape merged commit f940365 into master May 4, 2019
@shellscape shellscape deleted the fix/address-localhost branch May 4, 2019 05:57
smashercosmo pushed a commit to smashercosmo/webpack-plugin-serve that referenced this pull request Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants