Skip to content

Commit f19ffbc

Browse files
authored
docs: add a trouble shooting section for DevContainers (#19303)
1 parent 353c467 commit f19ffbc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/guide/troubleshooting.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ This is because Node.js limits request header size to mitigate [CVE-2018-12121](
130130

131131
To avoid this, try to reduce your request header size. For example, if the cookie is long, delete it. Or you can use [`--max-http-header-size`](https://nodejs.org/api/cli.html#--max-http-header-sizesize) to change max header size.
132132

133+
### Dev Containers / VS Code Port Forwarding
134+
135+
If you are using a Dev Container or port forwarding feature in VS Code, you may need to set the [`server.host`](/config/server-options.md#server-host) option to `127.0.0.1` in the config to make it work.
136+
137+
This is because [the port forwarding feature in VS Code does not support IPv6](https://github.com/microsoft/vscode-remote-release/issues/7029).
138+
139+
See [#16522](https://github.com/vitejs/vite/issues/16522) for more details.
140+
133141
## HMR
134142

135143
### Vite detects a file change but the HMR is not working

0 commit comments

Comments
 (0)