Spaces:
BG5
/
Running

BG5 commited on
Commit
0f7ed8a
·
verified ·
1 Parent(s): 3cd7e0d

Update fun.py

Browse files
Files changed (1) hide show
  1. fun.py +2 -2
fun.py CHANGED
@@ -6,7 +6,7 @@ app = FastAPI()
6
  time.sleep(10)
7
  TARGET_BASE = "http://127.0.0.1:9222" # 替换为你的目标服务器
8
  resp = httpx.get(TARGET_BASE)
9
- print(f'RESP:{ resp.Response.json}')
10
  @app.api_route("/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"])
11
  async def proxy(request: Request, path: str):
12
  resp = httpx.get(TARGET_BASE)
@@ -34,7 +34,7 @@ async def proxy(request: Request, path: str):
34
  return Response(
35
  content=resp.content,
36
  status_code=resp.status_code,
37
- headers=
38
  )
39
 
40
 
 
6
  time.sleep(10)
7
  TARGET_BASE = "http://127.0.0.1:9222" # 替换为你的目标服务器
8
  resp = httpx.get(TARGET_BASE)
9
+ print(f'RESP:{resp.Response.json}')
10
  @app.api_route("/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"])
11
  async def proxy(request: Request, path: str):
12
  resp = httpx.get(TARGET_BASE)
 
34
  return Response(
35
  content=resp.content,
36
  status_code=resp.status_code,
37
+ headers=headers
38
  )
39
 
40