()
| 32 | |
| 33 | |
| 34 | def _static_root() -> Path: |
| 35 | raw = os.environ.get("DISPLAYKIT_STATIC_ROOT", "").strip() |
| 36 | root = Path(raw).resolve() if raw else REPO_ROOT |
| 37 | if not root.is_dir(): |
| 38 | raise RuntimeError( |
| 39 | f"Static root is not a directory: {root}. " |
| 40 | "Set DISPLAYKIT_STATIC_ROOT to a folder containing index.html, app.js, …" |
| 41 | ) |
| 42 | return root |
| 43 | |
| 44 | |
| 45 | def _trusted_hosts() -> list[str] | None: |