tanbushi commited on
Commit
d99260b
·
1 Parent(s): 5b7ab1a
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -68,6 +68,7 @@ async def proxy_gemini(request: Request, protocol: ProtocolType, host:str, path:
68
 
69
  # 移除FastAPI自带的Host头,避免Gemini校验报错
70
  client_headers.pop("host", None)
 
71
 
72
  # 将User-Agent改为curl/8.7.1,以模拟curl请求
73
  client_headers["User-Agent"] = "curl/8.7.1"
 
68
 
69
  # 移除FastAPI自带的Host头,避免Gemini校验报错
70
  client_headers.pop("host", None)
71
+ client_headers.pop("authorization", None)
72
 
73
  # 将User-Agent改为curl/8.7.1,以模拟curl请求
74
  client_headers["User-Agent"] = "curl/8.7.1"