INNER CODE UNIT · Python

_app_cors_origins

TianGzlab/OmicsClaw · omicsclaw/surfaces/desktop/server.py:392

def _app_cors_origins() -> list[str]:
    raw = str(os.getenv("OMICSCLAW_APP_CORS_ORIGINS", "") or "").strip()
    if not raw:
        return list(_DEFAULT_APP_CORS_ORIGINS)
    values = [item.strip() for item in raw.split(",") if item.strip()]
    return values or list(_DEFAULT_APP_CORS_ORIGINS)


def _coerce_kg_home(candidate: str) -> Path:
    """Accept either a project root or a concrete `.omicsclaw/knowledge` path."""
    value = str(candidate or "").strip()
    path = Path(value).expanduser()
    if path.name == "knowledge" and path.parent.name == ".omicsclaw":
        return path
    return path / ".omicsclaw" / "knowledge"


# Bench Phase 3.2 (ADR 0019) — availability of the optional OmicsClaw-KG

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…