Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve wildcard host note #8634

Merged
merged 5 commits into from Jun 18, 2022

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Jun 17, 2022

Description

#8543 (comment)

I didn't add an option to hide this note because it is not so long and there is no other option to hide messages.
If we are adding an option, I think we need to think of #1728 instead.

TODO

related discord discussion

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added the documentation Improvements or additions to documentation label Jun 17, 2022
@patak-dev
Copy link
Member

I think that this may end up confusing more users. There are a lot of details and warnings we could add. @sodatea would it be ok if we remove this warning from the CLI and document it in the docs as this PR is doing? As it was explained in the comment that triggered this issue, it will be normal in docker setups.

@sodatea
Copy link
Member

sodatea commented Jun 17, 2022

🤦‍♂️ Seems no perfect solution here.

IMO we can remove the CLI output for now.
I guess Docker users may be already used to very verbose outputs, but we still don't want to scare them with edge case warnings.

If there're still many people getting confused and opening issues, then it's not an edge case, we can then add it back.

@sapphi-red sapphi-red marked this pull request as draft June 17, 2022 16:11
Comment on lines 17 to 19
The first case is when `localhost` is used. Node.js below v17 reorders the result of resolved address by default. This means the resolved address might differ from the original result from DNS. When accessing `localhost`, browsers use DNS to resolve the address and that address might differ from the address which Vite is listening.

You could set [`dns.setDefaultResultOrder('verbatim')`](https://nodejs.org/docs/latest-v18.x/api/dns.html#dnssetdefaultresultorderorder) to disable the reordering behavior. Or you could set `server.host` to `127.0.0.1` explicitly.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could simplify this section if #8647 is merged.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it may still be helpful to explain this with #8647 merged. Others may wonder how localhost isn't printed and we have an answer here.

@sapphi-red sapphi-red marked this pull request as ready for review June 18, 2022 13:06
docs/config/server-options.md Outdated Show resolved Hide resolved
docs/config/server-options.md Outdated Show resolved Hide resolved
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants