From c8f66312870c3071b4cd89bf5458b6d152bf03ac Mon Sep 17 00:00:00 2001 From: Aira Catapang Date: Wed, 18 Mar 2026 11:50:57 +0000 Subject: [PATCH] Update main.py --- main.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.py b/main.py index b61addb..f9ccfdb 100644 --- a/main.py +++ b/main.py @@ -717,6 +717,17 @@ async def hls_proxy(url: str, request: Request): return StreamingResponse(stream_generator(), media_type="video/MP2T") +# 🔥 YOUR PRIVATE PROXY ROUTE 🔥 +@app.get("/proxy-mapper") +async def proxy_mapper(url: str): + """Proxies requests to the mapper API to bypass CORS""" + try: + async with httpx.AsyncClient(timeout=15, follow_redirects=True) as client: + resp = await client.get(url) + return resp.json() + except Exception as e: + return {"error": str(e)} + if __name__ == "__main__": import uvicorn