Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"memfs",
"execa",
"networkidle",
"bracketless",
"ipaddr",
"pageerror",
"unmock",
Expand Down
8 changes: 8 additions & 0 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2969,6 +2969,14 @@ class Server {
*/
#parseHostnameFromHeader = function (header) {
if (!header) return null;

// Some proxies forward bracketless IPv6 literals (e.g. "::1") in the Host
// header. `new URL` cannot parse them, so when the header is itself a
// valid IPv6 literal we treat the whole header as the hostname.
if (ipaddr.IPv6.isValid(header)) {
return header;
}

try {
// If the header does not have a scheme, prepend // so URL can parse it
const parseUrl = new URL(
Expand Down
4 changes: 2 additions & 2 deletions migration-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This document serves as a migration guide for `webpack-dev-server@6.0.0`.

## ⚠ Breaking Changes

- Minimum supported `Node.js` version is `20.9.0`.
- Minimum supported `Node.js` version is `22.15.0`.
- Minimum supported `webpack` version is `5.101.0`.
- Support for **SockJS** in the WebSocket transport has been removed. Now, only **native WebSocket** is supported, or **custom** client and server implementations can be used.
- The options for passing to the `proxy` have changed. Please refer to the [http-proxy-middleware migration guide](https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md) for details.
- Remove support for the spdy server type. Use the http2 server type instead; however, since Express does not work correctly with it, a custom server (e.g., Connect or Hono) should be used.
- Remove support for the spdy server type.Use the http2 server type instead; however, since Express does not work correctly with it, a custom server (e.g., Connect or Hono) should be used.

v4:

Expand Down
Loading
Loading