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