BG5 commited on
Commit
1ba973c
·
verified ·
1 Parent(s): da2577a

Update fun.py

Browse files
Files changed (1) hide show
  1. fun.py +1 -1
fun.py CHANGED
@@ -19,7 +19,7 @@ logger = logging.getLogger(__name__)
19
  async def proxy(request: Request, path: str):
20
  url = f"{TARGET_BASE}/{path}"
21
  headers = dict(request.headers)
22
- # headers["host"] = "127.0.0.1" # 强制修改 Host 头
23
  body = await request.body()
24
  async with httpx.AsyncClient(follow_redirects=True) as client:
25
  resp = await client.request(
 
19
  async def proxy(request: Request, path: str):
20
  url = f"{TARGET_BASE}/{path}"
21
  headers = dict(request.headers)
22
+ headers["host"] = "127.0.0.1" # 强制修改 Host 头
23
  body = await request.body()
24
  async with httpx.AsyncClient(follow_redirects=True) as client:
25
  resp = await client.request(