airsltd commited on
Commit
a67593a
·
1 Parent(s): 5bf06f3
Files changed (1) hide show
  1. proxyserver-fastapi.py +11 -3
proxyserver-fastapi.py CHANGED
@@ -96,9 +96,17 @@ async def proxy_request(url_path: str, request: Request):
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
-
101
-
 
 
 
 
 
 
 
 
102
  print("\n\n请求头部-2: ")
103
  pretty_json = json.dumps(headers, indent=4, sort_keys=True, ensure_ascii=False)
104
  print(pretty_json)
 
96
  headers["accept-encoding"]="gzip, deflate, br"
97
  headers["authorization"]=f"Bearer {third_party_api_key}"
98
  headers["content-type"]="application/json"
99
+ headers["postman-token"]="ad3552d5-c379-4ec0-ae86-9b26cc59bb4b"
100
+ headers["user-agent"]="PostmanRuntime/7.45.0"
101
+ headers["x-amzn-trace-id"]="Root=1-68a054e2-78a54d08502e945f387c1952"
102
+ headers["x-direct-url"]="https://airsltd-fastapi-proxy.hf.space/--replicas/pn6yq/v1/https/generativelanguage.googleapis.com/v1beta/openai/chat/completions"
103
+ headers["x-forwarded-for"]="45.144.242.202"
104
+ headers["x-forwarded-port"]="443"
105
+ headers["x-forwarded-proto"]="https"
106
+ headers["x-ip-token"]="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpcCI6IjQ1LjE0NC4yNDIuMjAyIiwidXNlciI6bnVsbCwidXVpZCI6bnVsbCwiZXJyb3IiOiJJbnZhbGlkQWNjZXNzVG9rZW4iLCJleHAiOjE3NTUzMzgwMTR9.1e-GZx1NaD0_91Bs2g0SZIAiUCSVc8g5EUHVrTGsbcE"
107
+ headers["x-request-id"]="YG7fx0"
108
+
109
+
110
  print("\n\n请求头部-2: ")
111
  pretty_json = json.dumps(headers, indent=4, sort_keys=True, ensure_ascii=False)
112
  print(pretty_json)