Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add rewrite:RespHeaders and modify the upstream response headers via request implementation #6426

Merged
merged 10 commits into from
Mar 4, 2022
8 changes: 8 additions & 0 deletions apisix/plugins/ext-plugin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,14 @@ local rpc_handlers = {
end
end

local len = rewrite:RespHeadersLength()
tokers marked this conversation as resolved.
Show resolved Hide resolved
if len > 0 then
for i = 1, len do
local entry = rewrite:RespHeaders(i)
core.response.set_header(entry:Name(), entry:Value())
end
end

local len = rewrite:ArgsLength()
if len > 0 then
local changed = {}
Expand Down