Harden Stork for public demo and family durability
Read-only demo boards, per-IP rate limits, opaque voter sessions, session leave, upload sniffing, path containment, and retire /v1.
This commit is contained in:
@@ -15,10 +15,15 @@ def client(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> TestClient:
|
||||
monkeypatch.setenv("STORK_INVITE_TOKEN", "test-invite-token")
|
||||
monkeypatch.setenv("STORK_ADMIN_TOKEN", "test-admin-token")
|
||||
monkeypatch.setenv("STORK_COOKIE_SECURE", "false")
|
||||
monkeypatch.delenv("STORK_READONLY_BOARD_IDS", raising=False)
|
||||
monkeypatch.delenv("STORK_RL_BOARDS_PER_HOUR", raising=False)
|
||||
|
||||
import stork.app as app_mod
|
||||
import stork.rate_limit as rl_mod
|
||||
|
||||
importlib.reload(rl_mod)
|
||||
importlib.reload(app_mod)
|
||||
app_mod.limiter.reset()
|
||||
with TestClient(app_mod.app) as test_client:
|
||||
yield test_client
|
||||
app_mod.store.close()
|
||||
|
||||
Reference in New Issue
Block a user