feat: /api/v2/analiza/* endpoints - sport analytics backend

This commit is contained in:
Damir Radulic
2026-05-16 00:28:12 +02:00
parent 7ca5d7d94e
commit aca5051418
1355 changed files with 321891 additions and 4128 deletions
+3
View File
@@ -106,6 +106,9 @@ def _fetch_internal(endpoint: str, authorization: Optional[str]) -> Any:
raise HTTPException(status_code=400, detail="endpoint required")
# Normalize: must start with / — accept full URL only if it points at us.
ep = unquote(endpoint).strip()
# Ukloni /sport prefiks ako postoji (frontend šalje /sport/api/...)
if ep.startswith("/sport/"):
ep = ep[len("/sport"):]
if ep.startswith(("http://", "https://")):
# Only allow our own host to avoid SSRF.
if not ep.startswith(INTERNAL_BASE):