Spaces:
Sleeping
Sleeping
update
Browse files- proxyserver-fastapi.py +4 -0
proxyserver-fastapi.py
CHANGED
|
@@ -92,7 +92,11 @@ async def proxy_request(url_path: str, request: Request):
|
|
| 92 |
print(pretty_json)
|
| 93 |
|
| 94 |
headers=[]
|
|
|
|
|
|
|
| 95 |
headers["authorization"]=f"Bearer {third_party_api_key}"
|
|
|
|
|
|
|
| 96 |
print("\n\n请求头部-2: ")
|
| 97 |
pretty_json = json.dumps(headers, indent=4, sort_keys=True, ensure_ascii=False)
|
| 98 |
print(pretty_json)
|
|
|
|
| 92 |
print(pretty_json)
|
| 93 |
|
| 94 |
headers=[]
|
| 95 |
+
headers["accept"]="*/*"
|
| 96 |
+
headers["accept-encoding"]="gzip, deflate, br"
|
| 97 |
headers["authorization"]=f"Bearer {third_party_api_key}"
|
| 98 |
+
headers["content-type"]="application/json"
|
| 99 |
+
headers["user-agent"]="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
|
| 100 |
print("\n\n请求头部-2: ")
|
| 101 |
pretty_json = json.dumps(headers, indent=4, sort_keys=True, ensure_ascii=False)
|
| 102 |
print(pretty_json)
|