aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpserver.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-03-12 15:27:52 +0100
committerStefan Boberg <[email protected]>2026-03-12 15:36:46 +0100
commit4597530db3e931f6c3bca41251a6c350f89739f6 (patch)
tree4b3ae3d753fd8dd9cc4f2d9e0919f982b2c8458e /src/zenhttp/httpserver.cpp
parentbuild fixes introduced by merge to main (diff)
downloadzen-4597530db3e931f6c3bca41251a6c350f89739f6.tar.xz
zen-4597530db3e931f6c3bca41251a6c350f89739f6.zip
Add --no-network option to disable TCP/HTTPS listeners
Allow zenserver to run with only a Unix domain socket for communication by skipping TCP and HTTPS acceptor creation when --no-network is set. Useful for sandboxed builds and security-sensitive environments. Includes CLI option, Lua config binding, validation (requires --unix-socket, forces asio backend), and integration test. Suppresses the misleading frontend link log line when no TCP listener is active.
Diffstat (limited to 'src/zenhttp/httpserver.cpp')
-rw-r--r--src/zenhttp/httpserver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zenhttp/httpserver.cpp b/src/zenhttp/httpserver.cpp
index 1a0018908..6ba0ca563 100644
--- a/src/zenhttp/httpserver.cpp
+++ b/src/zenhttp/httpserver.cpp
@@ -1157,7 +1157,7 @@ CreateHttpServerClass(const std::string_view ServerClass, const HttpServerConfig
ZEN_INFO("using asio HTTP server implementation")
return CreateHttpAsioServer(AsioConfig {
.ThreadCount = Config.ThreadCount, .ForceLoopback = Config.ForceLoopback, .IsDedicatedServer = Config.IsDedicatedServer,
- .UnixSocketPath = Config.UnixSocketPath,
+ .NoNetwork = Config.NoNetwork, .UnixSocketPath = Config.UnixSocketPath,
#if ZEN_USE_OPENSSL
.HttpsPort = Config.HttpsPort, .CertFile = Config.CertFile, .KeyFile = Config.KeyFile,
#endif