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:27:52 +0100
commit54d643d70fe617f6d8bcc38dcb396ea6e6abdfd4 (patch)
treef67bb0c14eb9f622ae5d2d75eda83914e8fe1178 /src/zenhttp/httpserver.cpp
parentbuild fixes introduced by merge to main (diff)
downloadzen-54d643d70fe617f6d8bcc38dcb396ea6e6abdfd4.tar.xz
zen-54d643d70fe617f6d8bcc38dcb396ea6e6abdfd4.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.
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