-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
docs: improve wildcard host note #8634
Conversation
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. |
🤦♂️ Seems no perfect solution here. IMO we can remove the CLI output for now. If there're still many people getting confused and opening issues, then it's not an edge case, we can then add it back. |
docs/config/server-options.md
Outdated
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
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?
Before submitting the PR, please make sure you do the following
fixes #123
).