Update fun.py
Browse files
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(
|