From c40a813ccc9a36fd3571238f39e54ada29d2c7f3 Mon Sep 17 00:00:00 2001 From: soulbird Date: Tue, 3 Jan 2023 17:54:31 +0800 Subject: [PATCH] remove exclude resp headers --- apisix/plugins/ext-plugin/init.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apisix/plugins/ext-plugin/init.lua b/apisix/plugins/ext-plugin/init.lua index 2e9a7494e44d..b6fcf6fea82c 100644 --- a/apisix/plugins/ext-plugin/init.lua +++ b/apisix/plugins/ext-plugin/init.lua @@ -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, } @@ -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