Skip to content

Commit

Permalink
fix(ai-proxy): fix content-encoding for non 200 responses
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion authored and ProBrian committed Dec 13, 2024
1 parent f07e75c commit 7a2dded
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kong/llm/plugin/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ function MetaPlugin:header_filter(sub_plugin, conf)
-- for gzip response, don't set content-length at all to align with upstream
kong.response.clear_header("Content-Length")
kong.response.set_header("Content-Encoding", "gzip")

else
kong.response.clear_header("Content-Encoding")
end

else
Expand Down

0 comments on commit 7a2dded

Please sign in to comment.