fix: default bind to :: for IPv6 dual-stack
This commit is contained in:
@@ -7,6 +7,9 @@ __pycache__/
|
|||||||
.ruff_cache/
|
.ruff_cache/
|
||||||
dist/
|
dist/
|
||||||
|
|
||||||
|
# Ruby leftovers (from the old build)
|
||||||
|
/pkg/
|
||||||
|
|
||||||
# Test / coverage
|
# Test / coverage
|
||||||
/coverage/
|
/coverage/
|
||||||
/tmp/
|
/tmp/
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ except ImportError:
|
|||||||
DEFAULT_PATH = "/etc/volumen/config.toml"
|
DEFAULT_PATH = "/etc/volumen/config.toml"
|
||||||
|
|
||||||
DEFAULTS: dict[str, Any] = {
|
DEFAULTS: dict[str, Any] = {
|
||||||
"server": {"host": "0.0.0.0", "port": 9090},
|
"server": {"host": "::", "port": 9090},
|
||||||
"content_dir": "/var/lib/volumen/posts",
|
"content_dir": "/var/lib/volumen/posts",
|
||||||
"users_file": "/var/lib/volumen/users.toml",
|
"users_file": "/var/lib/volumen/users.toml",
|
||||||
"site": {
|
"site": {
|
||||||
@@ -37,7 +37,7 @@ TEMPLATE = """\
|
|||||||
# volumen configuration.
|
# volumen configuration.
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
host = "0.0.0.0"
|
host = "::"
|
||||||
port = 9090
|
port = 9090
|
||||||
|
|
||||||
# Directory of your Markdown posts (.md with TOML frontmatter).
|
# Directory of your Markdown posts (.md with TOML frontmatter).
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class TestDefaults:
|
|||||||
config = Config.load(path=MISSING)
|
config = Config.load(path=MISSING)
|
||||||
assert config.port == 9090
|
assert config.port == 9090
|
||||||
assert config.language == "en"
|
assert config.language == "en"
|
||||||
assert config.host == "0.0.0.0"
|
assert config.host == "::"
|
||||||
|
|
||||||
def test_default_content_dir(self) -> None:
|
def test_default_content_dir(self) -> None:
|
||||||
config = Config.load(path=MISSING)
|
config = Config.load(path=MISSING)
|
||||||
@@ -38,7 +38,7 @@ class TestOverrides:
|
|||||||
def test_does_not_mutate_defaults(self) -> None:
|
def test_does_not_mutate_defaults(self) -> None:
|
||||||
Config.load(path=MISSING, overrides={"host": "10.0.0.1"})
|
Config.load(path=MISSING, overrides={"host": "10.0.0.1"})
|
||||||
fresh = Config.load(path=MISSING)
|
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:
|
def test_does_not_mutate_default_inner_hashes(self) -> None:
|
||||||
config = Config.load(path=MISSING)
|
config = Config.load(path=MISSING)
|
||||||
|
|||||||
Reference in New Issue
Block a user