Update run.py
Browse files
run.py
CHANGED
|
@@ -19,7 +19,12 @@ app = FastAPI(lifespan=close_proxy_event)
|
|
| 19 |
|
| 20 |
@app.get("/{path:path}")
|
| 21 |
async def _(request: Request, path: str = ""):
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
if __name__ == '__main__':
|
|
|
|
| 19 |
|
| 20 |
@app.get("/{path:path}")
|
| 21 |
async def _(request: Request, path: str = ""):
|
| 22 |
+
response = await proxy.proxy(request=request, path=path)
|
| 23 |
+
return Response(
|
| 24 |
+
content=response.content,
|
| 25 |
+
status_code=response.status_code,
|
| 26 |
+
headers=dict(response.headers)
|
| 27 |
+
)
|
| 28 |
|
| 29 |
|
| 30 |
if __name__ == '__main__':
|