Revert "Enforce websocket origin allowlist with secure-mode config"
This reverts commit cf30229b37.
This commit is contained in:
@@ -9,7 +9,6 @@ def test_load_config_defaults_when_path_none() -> None:
|
||||
cfg = load_config(None)
|
||||
assert cfg.server.bind_ip == "127.0.0.1"
|
||||
assert cfg.network.allow_insecure_ws is False
|
||||
assert cfg.network.allowed_origins == []
|
||||
assert cfg.storage.state_file == "runtime/items.json"
|
||||
assert cfg.storage.state_save_debounce_ms == 200
|
||||
assert cfg.storage.state_save_max_delay_ms == 1000
|
||||
@@ -44,16 +43,3 @@ state_save_max_delay_ms = 900
|
||||
cfg = load_config(config_path)
|
||||
assert cfg.storage.state_save_debounce_ms == 150
|
||||
assert cfg.storage.state_save_max_delay_ms == 900
|
||||
|
||||
|
||||
def test_load_config_reads_allowed_origins(tmp_path: Path) -> None:
|
||||
config_path = tmp_path / "config.toml"
|
||||
config_path.write_text(
|
||||
"""
|
||||
[network]
|
||||
allow_insecure_ws = true
|
||||
allowed_origins = ["https://bestmidi.com", "https://www.bestmidi.com"]
|
||||
""".strip()
|
||||
)
|
||||
cfg = load_config(config_path)
|
||||
assert cfg.network.allowed_origins == ["https://bestmidi.com", "https://www.bestmidi.com"]
|
||||
|
||||
Reference in New Issue
Block a user