Spaces:
BG5
/
Running

BG5 commited on
Commit
7027c85
·
verified ·
1 Parent(s): f7f455f

Update fun.py

Browse files
Files changed (1) hide show
  1. fun.py +2 -1
fun.py CHANGED
@@ -14,8 +14,9 @@ async def proxy(request: Request, path: str):
14
 
15
  url = f"{TARGET_BASE}/{path}"
16
  headers = dict(request.headers)
 
17
  # 强制 Host 头为 127.0.0.1,避免 Chrome 拒绝
18
- headers["host"] = "127.0.0.1"
19
  body = await request.body()
20
  async with httpx.AsyncClient(follow_redirects=True) as client:
21
  resp = await client.request(
 
14
 
15
  url = f"{TARGET_BASE}/{path}"
16
  headers = dict(request.headers)
17
+
18
  # 强制 Host 头为 127.0.0.1,避免 Chrome 拒绝
19
+ # headers["host"] = "127.0.0.1"
20
  body = await request.body()
21
  async with httpx.AsyncClient(follow_redirects=True) as client:
22
  resp = await client.request(