Skip to content

Commit

Permalink
remove exclude resp headers
Browse files Browse the repository at this point in the history
  • Loading branch information
soulbird committed Jan 3, 2023
1 parent 8ccffdf commit c40a813
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions apisix/plugins/ext-plugin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ local exclude_resp_header = {
["server"] = true,
["www-authenticate"] = true,
["content-encoding"] = true,
["content-type"] = true,
["content-location"] = true,
["content-language"] = true,
}
Expand Down Expand Up @@ -790,13 +791,11 @@ local rpc_handlers = {
for i = 1, len do
local entry = call_resp:Headers(i)
local name = str_lower(entry:Name())
if not exclude_resp_header[name] then
if resp_headers[name] == nil then
core.response.set_header(name, entry:Value())
resp_headers[name] = true
else
core.response.add_header(name, entry:Value())
end
if resp_headers[name] == nil then
core.response.set_header(name, entry:Value())
resp_headers[name] = true
else
core.response.add_header(name, entry:Value())
end
end
else
Expand Down

0 comments on commit c40a813

Please sign in to comment.