From 51d744e0ead7b1e1f8e206f2b86545c1afe1f9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Balv=C3=ADn?= Date: Wed, 22 Jul 2026 21:14:41 +0200 Subject: [PATCH] fix: default bind to :: for IPv6 dual-stack --- .gitignore | 3 +++ src/volumen/config.py | 4 ++-- tests/test_config.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5886a92..f9e34fc 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ __pycache__/ .ruff_cache/ dist/ +# Ruby leftovers (from the old build) +/pkg/ + # Test / coverage /coverage/ /tmp/ diff --git a/src/volumen/config.py b/src/volumen/config.py index 851cba1..a811c79 100644 --- a/src/volumen/config.py +++ b/src/volumen/config.py @@ -15,7 +15,7 @@ except ImportError: DEFAULT_PATH = "/etc/volumen/config.toml" DEFAULTS: dict[str, Any] = { - "server": {"host": "0.0.0.0", "port": 9090}, + "server": {"host": "::", "port": 9090}, "content_dir": "/var/lib/volumen/posts", "users_file": "/var/lib/volumen/users.toml", "site": { @@ -37,7 +37,7 @@ TEMPLATE = """\ # volumen configuration. [server] -host = "0.0.0.0" +host = "::" port = 9090 # Directory of your Markdown posts (.md with TOML frontmatter). diff --git a/tests/test_config.py b/tests/test_config.py index dcd3bb9..f0546ef 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -14,7 +14,7 @@ class TestDefaults: config = Config.load(path=MISSING) assert config.port == 9090 assert config.language == "en" - assert config.host == "0.0.0.0" + assert config.host == "::" def test_default_content_dir(self) -> None: config = Config.load(path=MISSING) @@ -38,7 +38,7 @@ class TestOverrides: def test_does_not_mutate_defaults(self) -> None: Config.load(path=MISSING, overrides={"host": "10.0.0.1"}) fresh = Config.load(path=MISSING) - assert fresh.host == "0.0.0.0" + assert fresh.host == "::" def test_does_not_mutate_default_inner_hashes(self) -> None: config = Config.load(path=MISSING)