Skip to content

Commit ff308d5

Browse files
authored
fix: Remove the Authorization request header when using AI-proxy to proxy Gemini (#2220)
1 parent af8502b commit ff308d5

File tree

1 file changed

+1
-0
lines changed
  • plugins/wasm-go/extensions/ai-proxy/provider

1 file changed

+1
-0
lines changed

plugins/wasm-go/extensions/ai-proxy/provider/gemini.go

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func (g *geminiProvider) OnRequestHeaders(ctx wrapper.HttpContext, apiName ApiNa
6868
func (g *geminiProvider) TransformRequestHeaders(ctx wrapper.HttpContext, apiName ApiName, headers http.Header) {
6969
util.OverwriteRequestHostHeader(headers, geminiDomain)
7070
headers.Set(geminiApiKeyHeader, g.config.GetApiTokenInUse(ctx))
71+
util.OverwriteRequestAuthorizationHeader(headers, "")
7172
}
7273

7374
func (g *geminiProvider) OnRequestBody(ctx wrapper.HttpContext, apiName ApiName, body []byte) (types.Action, error) {

0 commit comments

Comments
 (0)