feat: /api/v2/analiza/* endpoints - sport analytics backend
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user