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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/config/server-options.md
Expand Up @@ -10,6 +10,13 @@ Set this to `0.0.0.0` or `true` to listen on all addresses, including LAN and pu

This can be set via the CLI using `--host 0.0.0.0` or `--host`.

::: tip NOTE
sapphi-red marked this conversation as resolved.
Show resolved Hide resolved

When wildcard hosts (cf. `0.0.0.0`) is used, other servers might respond instead of Vite.
This is because servers listening on explicit hosts take priority over those listening on wildcard hosts.

:::

## server.port

- **Type:** `number`
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/logger.ts
Expand Up @@ -224,7 +224,7 @@ function printServerUrls(
notes.push({
label: 'Note',
message: colors.dim(
'You are using a wildcard host. Ports might be overridden.'
'Other server might respond instead. More information: https://vitejs.dev/config/server-options.html#server-host'
)
})
}
Expand Down