diff --git a/actix-web/CHANGES.md b/actix-web/CHANGES.md index 59901dfd4..cb51dbec8 100644 --- a/actix-web/CHANGES.md +++ b/actix-web/CHANGES.md @@ -2,6 +2,7 @@ ## Unreleased +- Enable dual-stack IPv6 sockets on Windows so that binding to `[::]` also accepts IPv4 connections. - Panic when calling `Route::to()` or `Route::service()` after `Route::wrap()` to prevent silently dropping route middleware. [#3944] - Fix `HttpRequest::{match_pattern,match_name}` reporting path-only matches when route guards disambiguate overlapping resources. [#3346] - Fix `Readlines` handling of lines split across payload chunks so combined line limits are enforced and complete lines are yielded. diff --git a/actix-web/src/server.rs b/actix-web/src/server.rs index 135522d3a..3835b6ddb 100644 --- a/actix-web/src/server.rs +++ b/actix-web/src/server.rs @@ -445,6 +445,13 @@ where /// Using a bind address of `0.0.0.0`, which signals to use all interfaces, may also multiple /// the number of instantiations in a similar way. /// + /// # Dual-Stack IPv6 + /// + /// On Windows, binding to an IPv6 address (e.g., `[::]:8080`) automatically enables dual-stack + /// mode, allowing the socket to accept both IPv4 and IPv6 connections. On Linux and macOS, + /// dual-stack is typically already the OS default. If you need IPv6-only behavior on Windows, + /// create the listener manually and pass it to [`listen()`](Self::listen()). + /// /// # Typical Usage /// /// In general, use `127.0.0.1:` when testing locally and `0.0.0.0:` when deploying @@ -1259,6 +1266,14 @@ fn create_tcp_listener(addr: net::SocketAddr, backlog: u32) -> io::Result