From 75729e9a19fd5f1d0f9261ee8b9800d4d195769c Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Sun, 25 Feb 2018 01:07:50 +0100 Subject: [PATCH] Change default bindAddress to 127.0.0.1 --- http/vibe/http/server.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/http/vibe/http/server.d b/http/vibe/http/server.d index 375c000fc9..4f694ca475 100644 --- a/http/vibe/http/server.d +++ b/http/vibe/http/server.d @@ -163,7 +163,7 @@ unittest void test() { static void testSafeFunction(HTTPServerRequest req, HTTPServerResponse res) @safe {} - listenHTTP("0.0.0.0:8080", &testSafeFunction); + listenHTTP("127.0.0.1:8080", &testSafeFunction); listenHTTP(":8080", new class HTTPServerRequestHandler { void handleRequest(HTTPServerRequest req, HTTPServerResponse res) @safe {} }); @@ -629,9 +629,9 @@ final class HTTPServerSettings { /** The interfaces on which the HTTP server is listening. - By default, the server will listen on all IPv4 and IPv6 interfaces. + By default, the server will listen on `127.0.0.1`. */ - string[] bindAddresses = ["::", "0.0.0.0"]; + string[] bindAddresses = ["127.0.0.1"]; /** Determines the server host name. @@ -785,7 +785,7 @@ final class HTTPServerSettings { /// unittest { auto s = new HTTPServerSettings(":8080"); - assert(s.bindAddresses == ["::", "0.0.0.0"]); // default bind addresses + assert(s.bindAddresses == ["127.0.0.1"]); // default bind addresses assert(s.port == 8080); s = new HTTPServerSettings("123.123.123.123");