Files
gitrusprusandCursor 9dfe713668 Add CP→CA→PI platform foundation on MapMil monorepo.
Unify parsing workers, analytics API with PostgreSQL, map UI, and PI distribution into centers/ with Docker Compose.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 11:43:27 +03:00

12 lines
380 B
Python

import os
from fastapi import Header, HTTPException
def verify_internal_token(
x_internal_token: str | None = Header(default=None, alias="X-Internal-Token"),
) -> None:
expected = os.getenv("INTERNAL_TOKEN", "dev-internal-token")
if not x_internal_token or x_internal_token != expected:
raise HTTPException(status_code=401, detail="Invalid internal token")