This is an automated email from the ASF dual-hosted git repository.
binbin pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new a738910d Bind to localhost by default for security (#1676)
a738910d is described below
commit a738910da1f81e9e2922bd970e2559686d6cf3b8
Author: Twice <[email protected]>
AuthorDate: Tue Aug 15 16:48:45 2023 +0800
Bind to localhost by default for security (#1676)
By default, it is more secure and common to bind to localhost instead of
`0.0.0.0`.
Co-authored-by: Binbin <[email protected]>
---
kvrocks.conf | 3 ++-
src/config/config.cc | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kvrocks.conf b/kvrocks.conf
index 1debcced..781295ee 100644
--- a/kvrocks.conf
+++ b/kvrocks.conf
@@ -8,7 +8,8 @@
#
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1 ::1
-bind 0.0.0.0
+# bind 0.0.0.0
+bind 127.0.0.1
# Unix socket.
#
diff --git a/src/config/config.cc b/src/config/config.cc
index 5c9863c4..815852e5 100644
--- a/src/config/config.cc
+++ b/src/config/config.cc
@@ -40,7 +40,7 @@
#include "server/server.h"
#include "status.h"
-constexpr const char *kDefaultBindAddress = "0.0.0.0";
+constexpr const char *kDefaultBindAddress = "127.0.0.1";
constexpr const char *errBlobDbNotEnabled = "Must set
rocksdb.enable_blob_files to yes first.";
constexpr const char *errLevelCompactionDynamicLevelBytesNotSet =