feat: add the "admin-server-host" config to set the host for the admin server

This commit is contained in:
Andrei Dziahel
2024-06-24 14:47:19 -05:00
committed by GitHub
parent 4761fad956
commit 9d7e87b3e0
16 changed files with 43 additions and 4 deletions
+4 -3
View File
@@ -192,7 +192,8 @@ initSockets AppConfig{..} = do
cfg'uspm = configServerUnixSocketMode
cfg'host = configServerHost
cfg'port = configServerPort
cfg'adminport = configAdminServerPort
cfg'adminHost = configAdminServerHost
cfg'adminPort = configAdminServerPort
sock <- case cfg'usp of
-- I'm not using `streaming-commons`' bindPath function here because it's not defined for Windows,
@@ -210,9 +211,9 @@ initSockets AppConfig{..} = do
pure (num, sock)
pure sock
adminSock <- case cfg'adminport of
adminSock <- case cfg'adminPort of
Just adminPort -> do
adminSock <- bindPortTCP adminPort (fromString $ T.unpack cfg'host)
adminSock <- bindPortTCP adminPort (fromString $ T.unpack cfg'adminHost)
pure $ Just adminSock
Nothing -> pure Nothing