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
(cherry picked from commit 2cdafdd)
  • Loading branch information
fffonion committed Dec 2, 2024
1 parent f4b3595 commit 51fadf2
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 51fadf2

Please sign in to comment.