diff --git a/gateway/config.py b/gateway/config.py index 6cd436f82..06a411661 100644 --- a/gateway/config.py +++ b/gateway/config.py @@ -478,7 +478,7 @@ def _apply_env_overrides(config: GatewayConfig) -> None: config.platforms[Platform.WEB].enabled = True config.platforms[Platform.WEB].extra.update({ "port": int(os.getenv("WEB_UI_PORT", "8765")), - "host": os.getenv("WEB_UI_HOST", "127.0.0.1"), + "host": os.getenv("WEB_UI_HOST", "") or "127.0.0.1", "token": os.getenv("WEB_UI_TOKEN", ""), }) diff --git a/tests/gateway/test_web.py b/tests/gateway/test_web.py index 3b4b2809b..85a04941f 100644 --- a/tests/gateway/test_web.py +++ b/tests/gateway/test_web.py @@ -81,6 +81,7 @@ class TestConfigEnvOverrides(unittest.TestCase): @patch.dict(os.environ, { "WEB_UI_ENABLED": "true", "WEB_UI_TOKEN": "", + "WEB_UI_HOST": "", }, clear=False) def test_web_defaults(self): config = GatewayConfig()