From c7591a83317be289ab7f1a12c0c7aa2766b08dfb Mon Sep 17 00:00:00 2001 From: PeterPierinakos Date: Sat, 25 Jun 2022 08:38:19 +0000 Subject: [PATCH] Add documentation for `AppConfig`'s `Default` implementation --- actix-web/src/config.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/actix-web/src/config.rs b/actix-web/src/config.rs index dab309175..58a099c75 100644 --- a/actix-web/src/config.rs +++ b/actix-web/src/config.rs @@ -153,6 +153,16 @@ impl AppConfig { } impl Default for AppConfig { + /// Returns the default AppConfig. + /// Note: The included socket address is "127.0.0.1". + /// + /// 127.0.0.1: non-routable meta address that denotes an unknown, invalid or non-applicable target. + /// If you need a service only accessed by itself, use a loopback address. + /// A loopback address for IPv4 is any loopback address that begins with "127". + /// Loopback addresses should be only used to test your application locally. + /// The default configuration provides a loopback address. + /// + /// 0.0.0.0: if configured to use this special address, the application will listen to any IP address configured on the machine. fn default() -> Self { AppConfig::new( false,